/* markolech.com. Sidebar layout; each post opens with a short report, then the essay. No JS, no web fonts. */

:root {
  --bg: #ffffff;
  --ink: #16181d;
  --muted: #667085;
  --rule: #e4e7ec;
  --panel: #f8f9fb;
  --accent: #c2410c;

  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --ink: #e6e8ec;
    --muted: #98a2b3;
    --rule: #252a33;
    --panel: #151920;
    --accent: #fb923c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  padding: 0;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--rule); }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Layout: a full-height panel on the left, content on the right. */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.side {
  background: var(--panel);
  border-right: 1px solid var(--rule);
  padding: 32px 20px;
}
.side > * { max-width: 200px; }
@media (min-width: 721px) {
  .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
}

.who { display: block; text-decoration: none; margin-bottom: 36px; }
.who strong { display: block; font: 700 17px/1.2 var(--sans); }
.who span { display: block; font: 12px/1.4 var(--mono); color: var(--muted); margin-top: 4px; }

.side-label {
  font: 600 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 8px;
}
.side-nav, .side-toc { display: flex; flex-direction: column; margin: 0 0 32px; }
.side-nav a, .side-toc a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  margin-left: -10px;
  border-left: 2px solid transparent;
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}
.side-nav a:hover, .side-toc a:hover { color: var(--ink); }
.side-nav a[aria-current="page"] { color: var(--ink); border-left-color: var(--accent); background: var(--bg); }
.side-nav .count { font: 12px/1.7 var(--mono); color: var(--muted); }
.side-toc a { font-size: 13px; line-height: 1.4; }

.side-foot { margin: auto 0 0; font: 12px/1.6 var(--mono); color: var(--muted); }

.main { padding: 56px 48px 96px; max-width: 860px; }

.lede { max-width: 60ch; font-size: 17px; margin: 0 0 48px; }
.lede p { margin: 0 0 12px; }

.label { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; }

/* The log. */
.log { width: 100%; border-collapse: collapse; font-size: 14px; }
.log th {
  text-align: left;
  font: 600 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
}
.log td { padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.log td.id, .log td.date { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.log td.title { width: 100%; font-size: 15px; }
.log td.title a { text-decoration: none; font-weight: 500; }
.log-scroll { overflow-x: auto; }


/* ---------- post ---------- */

.post .id { font: 13px/1 var(--mono); color: var(--muted); margin: 0 0 12px; }
.post h1 { font: 700 34px/1.2 var(--sans); letter-spacing: -0.015em; margin: 0 0 12px; }
.post .meta { color: var(--muted); font-size: 14px; margin: 0 0 32px; }

.report {
  border: 1px solid var(--rule);
  background: var(--panel);
  border-radius: 8px;
  margin: 0 0 48px;
  overflow: hidden;
}
.report dl { margin: 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); }
.report dt, .report dd { margin: 0; padding: 10px 16px; border-top: 1px solid var(--rule); font-size: 14px; }
.report dt:first-of-type, .report dd:first-of-type { border-top: 0; }
.report dt { font: 600 11px/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.prose { font: 19px/1.7 var(--serif); max-width: 66ch; }
.prose h2 { font: 700 20px/1.3 var(--sans); margin: 44px 0 10px; }
.prose p { margin: 0 0 22px; }
.prose blockquote {
  margin: 0 0 22px;
  font: 15px/1.55 var(--sans);
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
}
.prose blockquote::before { content: "Lesson  "; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); display: block; margin-bottom: 6px; }
.prose pre {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 14px 16px;
  font: 14px/1.55 var(--mono);
  margin: 0 0 22px;
}
.back { font-size: 14px; margin-top: 48px; }

.foot { margin-top: 72px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }


@media (max-width: 720px) {
  .layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .side { border-right: 0; border-bottom: 1px solid var(--rule); padding: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
  .side > * { max-width: none; }
  .who { margin: 0; flex: 1 1 100%; }
  .side-label, .side-toc, .side-foot { display: none; }
  .side-nav { flex-direction: row; gap: 16px; margin: 0; }
  .side-nav a { margin: 0; padding: 0; border: 0; }
  .side-nav a[aria-current="page"] { background: none; }
  .side-nav .count { display: none; }
  .main { padding: 28px 16px 64px; }
  .log th.date, .log td.date { display: none; }
  .report dl { grid-template-columns: minmax(0, 1fr); }
  .report dt { padding-bottom: 0; }
  .report dd { border-top: 0; padding-top: 2px; }
  .post h1 { font-size: 27px; }
  .prose { font-size: 18px; }
}

/* ---------- RSS page ---------- */
.feed-url {
  font: 14px/1.5 var(--mono);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  user-select: all;
}

/* Home with nothing published yet. */
.empty { color: var(--muted); padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.log tr.soon td.title { color: var(--muted); font-style: italic; }

/* ---------- Windows 98 mode hooks (styles live in windows.css) ---------- */
.win-titlebar, .win-taskbar, .win-shutdown, .win-dialog, .win-off, .win-on { display: none !important; }
html.js:not([data-theme="windows"]) .side-nav a.win-on { display: flex !important; }
