/* Problem pages: question, code and video */
.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 .4em; }
.crumbs a { color: var(--muted); }
.problem h1 { margin: .1em 0 .2em; }
.problem h2 { margin-top: 1.4em; }
.problem-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.stmt { white-space: pre-line; }
pre.sample { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
    font: .9rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; }
.video-col { position: sticky; top: 76px; }
.lite-yt { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.lite-yt button { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; position: relative; }
.lite-yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lite-yt .play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 12px;
    background: rgba(220, 0, 0, .9); color: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.lite-yt button:hover .play, .lite-yt button:focus-visible .play { background: #f00; }
.lite-yt button:focus-visible { outline: 3px solid #c9dafb; }
.lite-yt iframe { width: 100%; height: 100%; border: 0; display: block; }

.codebox { border: 1px solid #d0d7de; border-radius: 10px; overflow: hidden; margin: .6em 0 1.4em; }
.codebar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 6px 10px 6px 14px; background: #f6f8fa; border-bottom: 1px solid #d0d7de; font-size: .9rem; font-weight: 600; }
.codebtns { display: flex; gap: 6px; flex-wrap: wrap; }
.codebox pre { margin: 0; overflow-x: auto; }
.codebox code { display: block; padding: 14px 16px; font: .88rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    tab-size: 4; color: #1f2328; background: #fff; }
.promo { margin: 1.6em 0; }
.promo p { margin: .3em 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .3em .85em; text-decoration: none; color: var(--ink); background: #fff; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip span { color: var(--muted); font-size: .85em; margin-left: .25em; }
.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 26px; }
.year h3 { margin: .6em 0 .2em; font-size: 1.05rem; }
.plist { margin: 0; padding-left: 0; list-style: none; }
.plist li { margin: .25em 0; }
.plist a { text-decoration: none; }
.plist a:hover { text-decoration: underline; }
.qn { display: inline-block; min-width: 2.2em; color: var(--muted); font-size: .85em; font-weight: 600; }
.plist-wide li { margin: .45em 0; }

/* highlight.js colours (GitHub light) */
.hljs-doctag, .hljs-keyword, .hljs-meta .hljs-keyword, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-variable.language_ { color: #cf222e; }
.hljs-title, .hljs-title.class_, .hljs-title.class_.inherited__, .hljs-title.function_ { color: #8250df; }
.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-meta, .hljs-number, .hljs-operator, .hljs-variable, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id { color: #0550ae; }
.hljs-regexp, .hljs-string, .hljs-meta .hljs-string { color: #0a3069; }
.hljs-built_in, .hljs-symbol { color: #953800; }
.hljs-comment, .hljs-code, .hljs-formula { color: #6e7781; font-style: italic; }

@media (max-width: 860px) {
    .problem-grid { grid-template-columns: 1fr; }
    .video-col { position: static; order: -1; }
}
