/* LeonSim blog: the landing page's design (website/public/index.html): black, Geist and Geist Mono, one cyan HUD accent,
   mono uppercase labels, square buttons, 6px panels. Keep the tokens below equal to the landing page's. */
:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #0a0c0f;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --ink: #f2f4f7;
  --ink-2: #9aa4af;
  --text: #bcc5ce;
  --muted: #5f6872;
  --hud: #7cf0ff;
  --cpu: #f2b45c;
  --before: #3a434e;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* names the posts and the inline chart use */
  --accent: var(--hud);
  --rule: var(--line);
  --body: var(--sans);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: clip; padding-top: 68px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hud); text-underline-offset: 3px; text-decoration-color: rgba(124, 240, 255, 0.4); }
a:hover { text-decoration-color: var(--hud); }
sub { font-size: 0.7em; }
:focus-visible { outline: 1px solid var(--hud); outline-offset: 4px; }
.w { max-width: 1240px; margin: 0 auto; padding-inline: 40px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 40px; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }

/* header: the landing page's */
.top { position: fixed; inset: 0 0 auto; z-index: 20; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--line); }
.top .w { display: flex; align-items: center; gap: 36px; height: 68px; max-width: none; }
.brand { font-weight: 600; font-size: 16px; letter-spacing: 0.18em; text-decoration: none; color: var(--ink); }
.top nav { display: flex; gap: 32px; margin-left: auto; }
.top nav a { text-decoration: none; color: var(--ink-2); transition: color .15s; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.cta { display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; background: rgba(255, 255, 255, 0.04); transition: background .2s, border-color .2s; white-space: nowrap; }
.cta:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }
.cta i { width: 7px; height: 7px; background: var(--hud); box-shadow: 0 0 12px var(--hud); }

/* article */
article { max-width: 760px; margin: 0 auto; padding-block: 56px 24px; }
.kicker { font-family: var(--mono); font-size: 11.5px; color: var(--hud); letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 20px; }
h1 { font-weight: 500; font-size: clamp(36px, 5.4vw, 64px); line-height: 0.98; letter-spacing: -0.045em; color: var(--ink); margin: 0 0 22px; text-wrap: balance; }
.dek { font-size: 20px; color: var(--ink-2); margin: 0 0 28px; line-height: 1.5; }
article h2 { font-weight: 500; letter-spacing: -0.035em; font-size: 32px; line-height: 1.08; color: var(--ink); margin: 56px 0 14px; text-wrap: balance; }
article h3 { font-weight: 500; letter-spacing: -0.02em; font-size: 21px; color: var(--ink); margin: 34px 0 8px; }
article p, article ul, article ol { margin: 0 0 18px; }
article li { margin-bottom: 6px; }
article strong { color: var(--ink); font-weight: 600; }
article code { font-family: var(--mono); font-size: 0.84em; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px; }
pre { margin: 0 0 22px; border: 1px solid var(--line); background: var(--panel); color: #d7dee6; border-radius: 6px; 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: 30px 0; }
figure.wide { margin-inline: calc(min(0px, (760px - min(1160px, 100vw - 32px)) / 2)); }
figure img { border-radius: 4px; border: 1px solid var(--line); }
figure img.framed { background: #fff; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 2px solid var(--hud); color: var(--ink-2); }

/* tables: the landing's .sheet */
.tablewrap.wide { margin-inline: calc(min(0px, (760px - min(900px, 100vw - 32px)) / 2)); }
.tablewrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14.5px; }
th, td { padding: 10px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { text-align: left; }
td:first-child { color: var(--ink); font-weight: 500; }
thead th { font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
td.wrap, th.wrap { white-space: normal; text-align: left; vertical-align: top; min-width: 150px; }
td strong { color: var(--ink); }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
tr.us td { color: var(--ink); background: rgba(124, 240, 255, 0.06); }
tr.us td:first-child { box-shadow: inset 2px 0 0 var(--hud); }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 34px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.callout { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px 20px; margin: 0 0 24px; }
.callout p:last-child { margin-bottom: 0; }
.callout.status { box-shadow: inset 2px 0 0 var(--cpu); }
.next { border-top: 1px solid var(--line); margin-top: 52px; padding-top: 22px; display: grid; gap: 6px; font-size: 16px; }
.next span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* 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: 2px; 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 2px 2px 0; }
.chart .b { top: 0; background: var(--before); }
.chart .a { top: 11px; background: var(--hud); box-shadow: 0 0 12px rgba(124, 240, 255, 0.45); }
.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(--line); margin-bottom: 40px; }
.post { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; padding-block: 28px; border-bottom: 1px solid var(--line); align-items: center; text-decoration: none; color: inherit; transition: background .2s; }
.post img { border-radius: 4px; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--panel); border: 1px solid var(--line); padding: 6px; }
.post h2 { font-weight: 500; letter-spacing: -0.03em; font-size: 26px; line-height: 1.1; margin: 8px 0 10px; color: var(--ink); max-width: none; }
.post p { margin: 0; color: var(--ink-2); font-size: 16px; }
.post time { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.post:hover h2, .post:focus-visible h2 { color: var(--hud); }

/* footer: the landing's */
footer { border-top: 1px solid var(--line); margin-top: 72px; }
footer .w { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 30px 40px; font-size: 13.5px; color: var(--muted); }
footer nav { display: flex; gap: 26px; flex-wrap: wrap; }
footer a { text-decoration: none; color: var(--ink-2); }
footer a:hover { color: var(--ink); }
footer .credit { flex-basis: 100%; order: 3; font-size: 12.5px; }
footer .credit a { text-decoration: underline; }

@media (max-width: 1000px) {
  .w, .wrap { padding-inline: 24px; }
  .top nav { display: none; }
  .top .cta { margin-left: auto; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  article { padding-block: 36px 16px; }
  article h2 { font-size: 27px; margin-top: 44px; }
  .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; }
}
@media (max-width: 620px) {
  .w, .top .w, .wrap { padding-inline: 16px; }
  .top .w { gap: 16px; }
  .top .cta { display: none; }
}

/* tutorials: a hero, then one step per row: the text next to its screen recording */
article.tut { max-width: 1240px; padding-block: 56px 24px; }
.tut-head { max-width: 860px; margin-bottom: 36px; }
.tut-head h1 { font-size: clamp(40px, 6.2vw, 78px); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 28px 0 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.facts div { padding: 14px 18px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.facts dd { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.4; }
.tut .callout { max-width: 860px; }
.tut > p, .tut > ul, .tut > ol, .tut > h2, .tut > h3, .tut > pre, .tut > .tablewrap, .tut > .next { max-width: 760px; }
.steps-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; max-width: 860px; }
.steps-nav a { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 2px; text-decoration: none; color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.steps-nav a:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.4); }
.steps-nav b { color: var(--hud); font-weight: 500; }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 48px; align-items: start; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 48px; }
.step-text { position: sticky; top: 92px; min-width: 0; }
.step-n { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hud); margin: 0 0 14px; }
.step-n b { display: inline-block; min-width: 26px; padding: 3px 6px; margin-right: 8px; border: 1px solid rgba(124, 240, 255, 0.45); border-radius: 2px; text-align: center; font-weight: 500; }
.step h2 { margin: 0 0 14px; font-size: clamp(26px, 3vw, 36px); max-width: none; }
.step-text p, .step-text ul, .step-text ol { margin: 0 0 16px; }
.step-text pre { margin: 0 0 18px; font-size: 12.5px; padding: 14px 16px; }
.step-media { min-width: 0; }
figure.clip { margin: 0; }
figure.clip video, figure.clip img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line-2); background: #000; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(124, 240, 255, 0.04); cursor: pointer; }
figure.clip figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: 10px; font-size: 14px; }
figure.clip figcaption .mono { color: var(--hud); letter-spacing: 0.14em; }
figure.clip .pp { margin-left: auto; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 2px; background: transparent; color: var(--ink-2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; flex: none; }
figure.clip .pp:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.4); }
.step-media figure.still { margin: 14px 0 0; }
.step-media .tablewrap { margin: 14px 0 0; }
.tut .wrapup { margin-top: 56px; }
@media (max-width: 980px) {
  .step { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .step-text { position: static; }
  .step-media { order: -1; }
  .tut-head h1 { line-height: 1; }
}
@media (max-width: 640px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(2n) { border-right: 0; }
  .facts div { border-bottom: 1px solid var(--line); }
}

/* tutorials index: two cards (clip, status, facts, steps), then notes */
.tut-index .tut-head { max-width: 860px; }
.tcards { display: grid; gap: 64px; margin: 8px 0 24px; }
.tcard { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: 48px; align-items: start; border-top: 1px solid var(--line); padding-top: 48px; }
.tcard:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); }
.tcard:nth-child(even) figure.clip { order: 2; }
.tcard h2 { margin: 14px 0 12px; font-size: clamp(28px, 3.2vw, 40px); max-width: none; }
.tcard h2 a { color: var(--ink); text-decoration: none; }
.tcard h2 a:hover { color: var(--hud); }
.tcard .dek { font-size: 17px; margin-bottom: 20px; }
.tcard .facts { margin: 0 0 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tcard .facts div:nth-child(2n) { border-right: 0; }
.tcard .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.tsteps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; }
.tsteps li { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink-2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.tsteps b { color: var(--hud); font-weight: 500; margin-right: 6px; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 2px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.badge.ok { border-color: rgba(124, 240, 255, 0.55); color: var(--hud); }
.badge.warn { border-color: rgba(242, 180, 92, 0.6); color: #f2b45c; }
.t-how { max-width: 760px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 32px; }
.t-how h2 { font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 14px; }
.tut-index .next { max-width: 760px; }
.tut-index .next a { display: block; }
@media (max-width: 980px) {
  .tcard, .tcard:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tcard:nth-child(even) figure.clip { order: 0; }
}
