/* Public code pages: /code and /code/<slug> (builds on mnodes.css) */

/* Cards: an image, or the language name when there is none */
.code-card-image { position:relative; background:#0d0b14; }
.code-card-placeholder { padding:0 16px; color:#b9a6ff; font:700 20px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; letter-spacing:.12em; text-align:center; text-transform:uppercase; }
.code-card h2 a { color:inherit; text-decoration:none; }
.code-card h2 a:hover { color:var(--purple); }

/* Language filter above the tags */
.code-languages a { font-size:14px; }

/* Detail page */
.code-hero { margin:0 0 28px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#0d0b14; box-shadow:0 4px 18px rgba(20,17,30,.06); }
.code-hero img { display:block; width:100%; aspect-ratio:16/9; max-height:520px; object-fit:cover; }
.code-detail .mnode-info a { color:var(--purple); font-weight:700; }
.code-license-note { margin:14px 0 0; color:var(--muted); font-size:14px; line-height:1.5; }

/* The code itself: plain text, no colours */
.code-block { margin-top:30px; padding-top:28px; background:var(--divider-mark) center top/16px 13px no-repeat,var(--divider-line) center 6px/100% 2px no-repeat; }
.code-block-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 18px; margin-bottom:12px; }
.code-block-head h2 { margin:0; font-size:22px; }
.code-block-head h2 span { margin-left:6px; color:var(--muted); font-size:14px; font-weight:400; }
.code-block-actions { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.code-block-actions a { color:var(--purple); font-size:14px; font-weight:700; }
.code-copy { padding:10px 16px; border:0; border-radius:7px; background:var(--purple); color:#fff; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.code-copy.is-copied { background:#087443; }
.code-block-text { max-height:640px; overflow:auto; margin:0; padding:18px 20px; border-radius:10px; background:#141220; color:#e9e6f5; font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; tab-size:4; white-space:pre; }

@media (max-width:760px) {
    .code-block-text { max-height:460px; padding:14px; font-size:12px; }
}
