html { font-family: system-ui, sans-serif; background: #f5f7fa; color: #172033; scroll-behavior: smooth; }
body { margin: 0; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; box-sizing: border-box; width: 217px; padding: 1.6rem 1rem; background: #0e1a28; color: white; }
.brand { display: block; margin: 0 0 1.6rem; color: white; font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.sidebar nav { display: grid; gap: .25rem; }
.sidebar nav a { padding: .65rem .65rem; border-radius: 7px; color: #e4edf7; font-size: .9rem; text-decoration: none; }
.sidebar nav a:hover, .sidebar nav a:focus-visible { background: #1b3043; color: white; outline: none; }
.main-content { box-sizing: border-box; width: calc(100% - 217px); max-width: 1200px; margin-left: 217px; padding: 2.25rem 3rem 4rem; }
.page-intro, .tutorial-section { scroll-margin-top: 1.5rem; }
.page-intro p { margin: .75rem 0 0; color: #52617a; }
h1 { margin: 2rem 0 .5rem; font-size: 1.65rem; font-weight: 600; letter-spacing: -.02em; }
h2 { margin: 2rem 0 .65rem; color: #555; font-size: 1.05rem; font-weight: 600; }
code, pre { font-family: Consolas, "Cascadia Code", monospace; }
.source-block, .example-block { background: white; border: 1px solid #e1e1e1; border-radius: 5px; margin: .75rem 0 1.25rem; overflow: hidden; }
.block-title, .block-header { padding: .45rem .75rem; background: #f1f1f1; border-bottom: 1px solid #e3e3e3; color: #555; font-size: .82rem; font-weight: 500; }
.block-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.block-header strong { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.block-actions { display: flex; align-items: center; padding: .3rem .55rem; border-top: 1px solid #e3e3e3; background: #f1f1f1; }
pre { margin: 0; padding: 1rem; overflow: auto; white-space: pre-wrap; }
.example-block pre.source, .source-block pre { margin: 0; border-radius: 0; }
.source { background: #fafafa; }
.output-title { padding: .55rem 1rem; font-weight: 700; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
.output { background: #111; color: #eee; min-height: 3rem; }
.run-button { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .45rem; border: 0; border-radius: 3px; background: transparent; color: #444; font: inherit; cursor: pointer; }
.run-button::before { content: "▶"; color: #079447; font-size: .75rem; }
.run-button:hover:not(:disabled) { background: #e4e4e4; color: #111; }
.run-button:focus-visible { outline: 2px solid #629bd1; outline-offset: 1px; }
.run-button:disabled { cursor: default; opacity: .55; }
.example-list { display: grid; gap: .5rem; margin: .75rem 0 1.25rem; padding: 0; list-style: none; }
.example-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid #e1e1e1; border-radius: 5px; background: white; }
.example-summary { display: flex; align-items: center; gap: .6rem; }
.example-name { font-weight: 600; }
.example-kind { padding: .15rem .4rem; border-radius: 999px; background: #e7edf4; color: #52617a; font-size: .7rem; font-weight: 600; text-transform: uppercase; }
.example-list code { color: #52617a; font-size: .82rem; }

.spectre-output {
    box-sizing: border-box;
    margin: 0;
    padding: 18px 20px;
    width: 100%;
    min-height: 0;
    overflow: auto;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    background: #202020;
    border-radius: 0;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 720px) {
    .sidebar { position: static; width: auto; padding: 1rem; }
    .brand { margin-bottom: .75rem; }
    .sidebar nav { display: flex; gap: .25rem; overflow-x: auto; }
    .sidebar nav a { flex: 0 0 auto; padding: .45rem .6rem; }
    .main-content { width: 100%; margin-left: 0; padding: 1.25rem 1rem 3rem; }
    h1 { margin-top: .5rem; }
    .example-list li { align-items: flex-start; flex-direction: column; gap: .3rem; }
}
