/* The article pages (article.php). The colour of each article is a division of the original series, as on the cards of the home page. */
:root {
	--bg: #04060b; --panel: #0a0f1a; --line: #1b2740; --text: #c9d6e8; --dim: #6b7d99; --amber: #ffb400; --cyan: #5fd7ff;
	--command: #e8c547; --science: #4aa8ff; --ops: #ff5a4d; --computer: #7fe3c4;
	--mono: "Cascadia Mono", "Cascadia Code", Consolas, "DejaVu Sans Mono", Menlo, monospace;
	--sans: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
	--accent: var(--command);
}
body.accent-command { --accent: var(--command); } body.accent-science { --accent: var(--science); }
body.accent-computer { --accent: var(--computer); } body.accent-ops { --accent: var(--ops); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: radial-gradient(ellipse at 50% -10%, #0e1730 0%, var(--bg) 55%) fixed; color: var(--text); font-family: var(--sans); font-size: 17.5px; line-height: 1.7; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; background: rgba(4,6,11,.88); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .brand { display: flex; }
.top .brand img { display: block; height: 16px; width: auto; transition: filter .2s; }
.top .brand:hover img { filter: brightness(1.2) drop-shadow(0 0 7px rgba(251,215,39,.7)); }
.top nav { display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.top nav a { color: var(--dim); text-decoration: none; }
.top nav a:hover { color: #fff; }
.top nav a.play { color: var(--amber); border: 1px solid var(--amber); border-radius: 999px; padding: 5px 16px; transition: all .2s; }
.top nav a.play:hover { background: var(--amber); color: #120c00; }

main { max-width: 760px; margin: 0 auto; padding: 44px 20px 30px; }

/* title */
.head { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
h1 { margin: 0; font-size: clamp(30px, 5.2vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; color: #fff; }

/* the introduction and the text */
.text .lead { font-size: 1.14em; line-height: 1.6; color: #e2eaf6; }
.text p { margin: 0 0 1.15em; }
.text h2 { margin: 2.1em 0 .6em; padding-left: 14px; border-left: 3px solid var(--accent); font-size: 1.55em; line-height: 1.25; color: #fff; }
.text h3 { margin: 1.8em 0 .5em; font-size: 1.18em; color: var(--accent); }
.text h4 { margin: 1.5em 0 .4em; font-size: 1em; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.text strong { color: #fff; }
.text hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.text ul, .text ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.text li { margin-bottom: .35em; }
.text li::marker { color: var(--accent); }

code { font-family: var(--mono); font-size: .88em; background: #0d1626; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: #e5c07b; }
pre { margin: 0 0 1.3em; padding: 14px 16px; overflow-x: auto; background: #060b14; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; font-size: 13.5px; color: #e5c07b; }

/* the leaderboard */
.levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.4em; }
.levels a { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.levels a:hover, .levels a:focus-visible { background: var(--accent); color: #120c00; outline: none; }
.scrolltable { overflow-x: auto; margin: 0 0 1.6em; }
table.scores { width: 100%; border-collapse: collapse; font-size: .92em; }
table.scores th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 400; padding: 6px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.scores td { padding: 7px 12px; border-bottom: 1px solid rgba(27,39,64,.6); white-space: nowrap; }
table.scores tbody tr:first-child td { color: var(--accent); font-weight: 700; }
table.scores td.num { font-family: var(--mono); text-align: right; }
table.scores th:nth-child(3), table.scores th:nth-child(4), table.scores th:nth-child(5) { text-align: right; }
table.scores td.name { color: #fff; }
table.scores .ok { color: var(--computer); }

/* lines of the series, and other quotations */
blockquote { margin: 0 0 1.3em; padding: 12px 18px; background: rgba(8,12,21,.8); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-family: var(--mono); font-size: .86em; line-height: 1.6; color: #e5c07b; }
blockquote p { margin: 0 0 .5em; }
blockquote p:last-child { margin-bottom: 0; }
blockquote strong { color: var(--accent); font-weight: 700; }
blockquote em { color: var(--dim); }

/* pictures */
figure { margin: 1.9em 0; }
figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; background: #000; }
/* a video: the picture links to YouTube (nothing of YouTube is loaded in this page) */
figure.video a { position: relative; display: block; }
figure.video a::after { content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0,0,0,.62); border: 2px solid #fff; transition: background .2s, transform .2s; }
figure.video a::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; margin: -15px 0 0 -9px; border-top: 15px solid transparent; border-bottom: 15px solid transparent; border-left: 26px solid #fff; }
figure.video a:hover::after, figure.video a:focus-visible::after { background: rgba(220,30,30,.9); transform: scale(1.08); }
figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--dim); text-align: center; }
p img { max-width: 100%; height: auto; vertical-align: middle; border-radius: 4px; }

/* still to do: shown while the article is being written */
figure.todo div { padding: 38px 16px; text-align: center; border: 2px dashed #6b5a1f; border-radius: 8px; color: #c9b45a; background: rgba(232,197,71,.05); font-size: 14px; }
figure.todo b { display: block; margin-bottom: 4px; font-family: var(--mono); letter-spacing: .2em; font-size: 11px; }
mark.todo { background: rgba(232,197,71,.18); color: #f1d97a; border-radius: 3px; padding: 1px 5px; }

/* the list of sections */
.toc { margin: 0 0 2em; padding: 14px 18px; background: rgba(8,12,21,.7); border: 1px solid var(--line); border-radius: 8px; font-size: 15px; line-height: 1.5; }
.toc b { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .25em; text-transform: uppercase; color: var(--dim); }
.toc ol { margin: 0; padding-left: 1.3em; column-width: 15em; column-gap: 2em; }   /* a long list is set in two columns */
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* previous and next article */
.more { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.more a { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; background: rgba(8,12,21,.86); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: #fff; transition: border-color .25s, transform .25s; line-height: 1.35; }
.more a:hover { border-color: var(--accent); transform: translateY(-3px); }
.more small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); }
.more .next { text-align: right; }
.more span { font-size: 15.5px; font-weight: 600; }

footer { padding: 18px 16px 28px; font-size: 12px; line-height: 1.6; color: var(--dim); text-align: center; }
footer p { margin: 0 auto; max-width: 1100px; text-wrap: balance; }
footer p + p { margin-top: 4px; opacity: .7; }

@media (max-width: 600px) {
	body { font-size: 16.5px; }
	main { padding-top: 30px; }
	.more { grid-template-columns: 1fr; }
	.more .next { text-align: left; }
	.top { padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
