/* Homepage overview video and annotated files, using the shared site palette. */
#how-it-works > p { text-wrap: pretty; }

/* the film */
.film { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #0b0d10; }
.film video { display: block; width: 100%; height: 100%; }
/* syntax colours, in the page's palette */
.lp-code .c { color: var(--muted); }
.lp-code .d { color: #7a3e9d; }
.lp-code .lb { color: #a15c07; }
.lp-code .op { color: var(--hb); text-decoration: none; cursor: inherit; border-radius: 0; }
.lp-code .rg { color: var(--text-2); }
.lp-code .pr { color: var(--bad); }
.lp-code .gap { color: #94a3b8; }
.lp-code .k { color: var(--hb); }
.lp-code .s { color: var(--good); }
.lp-code .nm, .lp-code .kw { color: #7a3e9d; }

/* annotated kernel files */
.lp-files { margin: 18px 0 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.lp-cmdbar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; padding: 12px 18px; border-bottom: 1px solid var(--rule); background: var(--code-bg); color: var(--muted); font: 15.5px/1.7 Inconsolata, ui-monospace, Menlo, monospace; }
.lp-cmdbar .w { color: var(--text); font-weight: 600; }
.lp-cmdbar button { all: unset; cursor: pointer; padding: 0 5px; border: 1px solid transparent; border-radius: 4px; color: var(--link); }
.lp-cmdbar button:hover { border-color: #cbd5e1; }
.lp-cmdbar button[aria-selected="true"] { border-color: #a9bfd8; background: #fff; color: var(--hb); }
.lp-cmdbar button:focus-visible, .lp-ftabs button:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.lp-ftabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.lp-ftabs button { all: unset; cursor: pointer; flex: none; padding: 10px 18px 9px; border-right: 1px solid var(--rule); }
.lp-ftabs button b { display: block; color: var(--text-2); font: 600 15.5px Inconsolata, ui-monospace, Menlo, monospace; }
.lp-ftabs button span { display: block; margin-top: 1px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lp-ftabs button:hover { background: #f8fafc; }
.lp-ftabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--hb); }
.lp-ftabs button[aria-selected="true"] b { color: var(--hb); }
.lp-fv { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); height: 540px; }
.lp-code { position: relative; margin: 0; padding: 12px 0 16px; overflow: auto; border-right: 1px solid var(--rule); border-radius: 0; background: #fff; color: var(--text); font: 14.5px/1.6 Inconsolata, ui-monospace, Menlo, monospace; tab-size: 4; }
.lp-code .l { position: relative; display: block; padding: 0 18px 0 70px; white-space: pre; transition: background 0.2s; }
.lp-code .l.hl { background: var(--step-bg); }
.lp-code .n { position: absolute; left: 0; width: 56px; color: #94a3b8; text-align: right; user-select: none; }
.lp-code .mk { all: unset; cursor: pointer; position: absolute; left: 5px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); border-radius: 50%; background: var(--text-2); color: #fff; font: 600 10px/16px Inter, sans-serif; text-align: center; }
.lp-code .l.hl .mk { background: var(--hb); }
.lp-fnotes { margin: 0; padding: 4px 22px 16px; overflow: auto; list-style: none; }
.lp-fnotes li { position: relative; margin: 0; padding: 13px 0 13px 32px; border-bottom: 1px solid var(--rule); outline: none; color: var(--text-2); font-size: 15px; line-height: 1.6; cursor: default; }
.lp-fnotes li:last-child { border-bottom: 0; }
.lp-fnotes li::before { content: attr(data-k); position: absolute; left: 0; top: 15px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); color: #fff; font: 600 11px/20px Inter, sans-serif; text-align: center; }
.lp-fnotes li b { color: var(--text); }
.lp-fnotes li.on, .lp-fnotes li:focus-visible { color: var(--text); }
.lp-fnotes li.on::before { background: var(--hb); }

@media (max-width: 760px) {
  .lp-fv { grid-template-columns: minmax(0, 1fr); height: auto; }
  .lp-code { max-height: 400px; border-right: 0; border-bottom: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) { .lp-code .l { transition: none; } }
