/*
Theme Name: Stock Corner
Author: Lumlux Art
Description: Custom theme for Stock Corner with The Ledger (SEC scanner).
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: stockcorner
License: GPL-2.0-or-later
*/

/* ---------- Fonts (self-hosted, no Google requests) ---------- */
@font-face { font-family: "Plex"; src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex"; src: url("assets/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex"; src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Cond"; src: url("assets/fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
	--paper: #eef2f0;
	--grid: #d3dedb;
	--grid-strong: #b7c8c3;
	--ink: #142a33;
	--ink-soft: #4a5f66;
	--surface: #f9fbfa;
	--up: #1e7f4f;
	--down: #b23a2e;
	--marker: #f1d24a;
	--marker-ink: #142a33;
	--focus: #2563a6;
	--body: "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;
	--head: "Plex Cond", "Arial Narrow", "Plex", system-ui, sans-serif;
	--measure: 68ch;
	--cell: 24px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--paper: #13212a;
		--grid: #1d303b;
		--grid-strong: #2b4351;
		--ink: #e3ece9;
		--ink-soft: #9fb3b8;
		--surface: #182a35;
		--up: #4fc58a;
		--down: #ef7b6c;
		--marker: #d9b934;
		--marker-ink: #13212a;
		--focus: #7fb4ec;
		color-scheme: dark;
	}
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--body);
	font-size: 1.0625rem;
	line-height: 1.55;
	color: var(--ink);
	background-color: var(--paper);
	background-image:
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: var(--cell) var(--cell);
	font-variant-numeric: tabular-nums;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: static; width: auto; height: auto; clip: auto; display: inline-block; padding: .5rem 1rem; background: var(--marker); color: var(--marker-ink); }

.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header { border-bottom: 2px solid var(--ink); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.25rem 1rem; }
.site-title { font-family: var(--head); font-weight: 700; font-size: 1.9rem; margin: 0; line-height: 1; }
.site-title a { text-decoration: none; }
.site-date { color: var(--ink-soft); font-size: .95rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-nav a { text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav .current-menu-item > a { text-decoration: underline; }

/* ---------- Intro ---------- */
.intro { padding-block: 3rem 2rem; }
.intro h1 { max-width: 16ch; }
.intro p { max-width: 52ch; font-size: 1.2rem; color: var(--ink-soft); margin: 0; }

/* ---------- Layout front page ---------- */
.desk { padding-bottom: 3rem; }
.panel { background: var(--surface); border: 1px solid var(--grid-strong); padding: 1.5rem; }
.panel > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.panel > h2 small { font-family: var(--body); font-weight: 400; font-size: .9rem; color: var(--ink-soft); }

/* ---------- The Ledger ---------- */
.gb-form { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.gb-form input {
	flex: 1; min-width: 0; font: 600 1.25rem var(--body); text-transform: uppercase;
	padding: .6rem .8rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
}
.gb-form input::placeholder { text-transform: none; font-weight: 400; color: var(--ink-soft); opacity: 1; }
.gb-form button, .button {
	font: 600 1rem var(--body); padding: .6rem 1.2rem; border: 2px solid var(--ink);
	background: var(--ink); color: var(--paper); cursor: pointer;
}
.gb-form button:hover, .button:hover { background: var(--paper); color: var(--ink); }
.gb-form button[disabled] { opacity: .6; cursor: wait; }
.gb-status { color: var(--ink-soft); min-height: 1.5em; }
.gb-status.is-error { color: var(--down); }

.gb-head { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; margin-bottom: 1.25rem; }
.gb-name { font-family: var(--head); font-size: 1.6rem; font-weight: 700; margin: 0; line-height: 1.1; }
.gb-meta { color: var(--ink-soft); margin: .25rem 0 0; font-size: .95rem; }

/* The score: ten squares on the paper, marked with highlighter. */
.gb-score { text-align: right; }
.gb-score-num { font-family: var(--head); font-size: 3rem; line-height: 1; }
.gb-score-num span { font-size: 1.25rem; color: var(--ink-soft); }
.gb-cells { display: flex; gap: 2px; justify-content: flex-end; margin-top: .4rem; }
.gb-cells i { width: 18px; height: 18px; border: 1px solid var(--ink); display: block; }
.gb-cells i.on { background: var(--marker); }
.gb-cells i.na { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--grid-strong) 3px 4px); border-style: dashed; }

.gb-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.gb-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.gb-table th, .gb-table td { padding: .45rem .6rem; border-bottom: 1px solid var(--grid-strong); text-align: right; white-space: nowrap; }
.gb-table th:first-child, .gb-table td:first-child { text-align: left; white-space: normal; }
.gb-table thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
.gb-pass { color: var(--up); font-weight: 600; }
.gb-fail { color: var(--down); font-weight: 600; }
.gb-na { color: var(--ink-soft); }
.gb-note { font-size: .9rem; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Berichten ---------- */
.post-list { padding-block: 0 3rem; }
.post-list > h2 { border-bottom: 2px solid var(--ink); padding-bottom: .4rem; }
.entry-row { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--grid-strong); }
@media (max-width: 600px) { .entry-row { grid-template-columns: 1fr; gap: .25rem; } }
.entry-row time { color: var(--ink-soft); font-size: .95rem; }
.entry-row h3 { margin: 0 0 .25rem; }
.entry-row h3 a { text-decoration: none; }
.entry-row p { margin: 0; color: var(--ink-soft); max-width: var(--measure); }

.single { padding-block: 3rem; }
.single article { background: var(--surface); border: 1px solid var(--grid-strong); padding: clamp(1.25rem, 4vw, 3rem); max-width: 820px; }
.entry-content { max-width: var(--measure); }
.entry-content > * + * { margin-top: 1em; }
.entry-meta { color: var(--ink-soft); margin-bottom: 1.5rem; }
.pagination { padding-block: 1rem 3rem; display: flex; gap: 1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 2px solid var(--ink); background: var(--paper); padding-block: 1.5rem 2rem; font-size: .9rem; color: var(--ink-soft); }
.site-footer p { max-width: var(--measure); margin: 0 0 .5rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
