/* LeonSim blog: same tokens as the landing page */
:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0f1319;
  --ink: #eef2f6;
  --ink-2: #a9b3be;
  --muted: #6f7b88;
  --rule: rgba(255, 255, 255, 0.10);
  --accent: #7cf0ff;
  --accent-ink: #07090c;
  --before: #3a434e;
  --code-bg: #05070a;
  --code-ink: #d7dee6;
  --display: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 64px; background: rgba(0, 0, 0, 0.72); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.72); clip-path: inset(0 -100vmax); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--rule); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.wordmark svg { width: 26px; height: 26px; }
nav { display: flex; gap: 26px; flex-wrap: wrap; font-size: 14.5px; margin-left: auto; }
nav a { color: var(--ink-2); text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--ink); }
nav a[aria-current] { color: var(--ink); }

/* article */
article { max-width: 740px; margin: 0 auto; padding-block: 32px 24px; }
.kicker { font-family: var(--mono); font-size: 12.5px; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 18px; text-wrap: balance; }
.dek { font-size: 21px; color: var(--ink-2); margin: 0 0 28px; line-height: 1.5; }
article h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 27px; line-height: 1.15; margin: 44px 0 12px; text-wrap: balance; }
article h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 30px 0 8px; }
article p, article ul, article ol { margin: 0 0 18px; }
article li { margin-bottom: 6px; }
article code { font-family: var(--mono); font-size: 0.86em; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 0 4px; }
pre { margin: 0 0 22px; border: 1px solid var(--rule); background: var(--code-bg); color: var(--code-ink); border-radius: 8px; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
pre .c { color: #7f95a8; }
figure { margin: 28px 0; }
figure.wide { margin-inline: calc(min(0px, (740px - min(1120px, 100vw - 40px)) / 2)); }
figure img { border-radius: 8px; }
figure img.framed { background: #fff; border: 1px solid var(--rule); }
figcaption { font-size: 14.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); }
.tablewrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 15px; }
th, td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.wrap, th.wrap { white-space: normal; }
tr.us td { font-weight: 600; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14.5px; color: var(--muted); margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.callout { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 16px 20px; margin: 0 0 22px; }
.callout p:last-child { margin-bottom: 0; }
.next { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 20px; display: grid; gap: 6px; font-size: 16px; }

/* bar chart: job time per device, before and after */
.chart { margin: 28px 0; display: grid; gap: 10px; }
.chart .legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.chart .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart .rows { display: grid; gap: 8px; }
.chart .row { display: grid; grid-template-columns: 112px 1fr 118px; gap: 12px; align-items: center; font-size: 14px; }
.chart .row > span { color: var(--ink-2); text-align: right; }
.chart .track { position: relative; height: 22px; }
.chart .b, .chart .a { position: absolute; left: 0; height: 9px; border-radius: 0 4px 4px 0; }
.chart .b { top: 0; background: var(--before); }
.chart .a { top: 11px; background: var(--accent); }
.chart .v { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.chart .v b { color: var(--ink); }
.chart .row:hover .b, .chart .row:focus-within .b { filter: brightness(0.9); }
.chart .axis { font-size: 12.5px; color: var(--muted); padding-left: 124px; }

/* index */
.posts { display: grid; gap: 0; border-top: 1px solid var(--rule); margin-bottom: 40px; }
.post { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 28px; padding-block: 26px; border-bottom: 1px solid var(--rule); align-items: center; text-decoration: none; color: inherit; }
.post img { border-radius: 8px; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--surface); border: 1px solid var(--rule); padding: 6px; }
.post h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 25px; line-height: 1.15; margin: 4px 0 8px; color: var(--ink); }
.post p { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.post time { font-size: 13.5px; color: var(--muted); }
.post:hover h2, .post:focus-visible h2 { text-decoration: underline; text-decoration-color: var(--accent); }
footer { margin-top: 56px; border-top: 1px solid var(--rule); padding-block: 28px 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  body { font-size: 17px; }
  .bar { height: auto; flex-wrap: wrap; gap: 10px 20px; padding-block: 14px 12px; }
  .bar nav { margin-left: 0; width: 100%; gap: 6px 18px; }
  .post { grid-template-columns: 1fr; gap: 14px; }
  .chart .row { grid-template-columns: 76px 1fr 104px; gap: 8px; font-size: 13px; }
  .chart .v { font-size: 12px; }
  .chart .axis { padding-left: 84px; }
}
