html { scroll-behavior: smooth; scroll-padding-top: 130px; }
.property-nav,.value-links,.exam-case-links { display:flex; flex-wrap:wrap; gap:9px; margin:18px 0; }
.property-nav a,.value-links a,.exam-case-links a { display:inline-block; padding:8px 12px; border:1px solid #4b5e7f; border-radius:9px; background:#1a2945; color:#cff8fb; text-decoration:none; font:600 13px ui-monospace,monospace; }
.property-nav a:hover,.value-links a:hover,.exam-case-links a:hover { background:#334a70; }
.property-nav { position:sticky; top:0; z-index:50; max-height:28vh; overflow:auto; align-content:start; padding:12px; border:1px solid #4b5e7f; border-radius:12px; background:#0d1729; box-shadow:0 10px 28px #050a16cc; }
.property { scroll-margin-top:130px; } .property>small { color:#b79cff; font-weight:800; text-transform:uppercase; }
.variant-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
#justify-content .variant-grid { grid-template-columns:minmax(0,1fr); }
.variant { min-width:0; padding:17px; border:1px solid #34435f; border-radius:13px; background:#101b2e; scroll-margin-top:130px; }
.variant:target { outline:2px solid #b79cff; box-shadow:0 0 25px #8b5cf633; } .variant h3 { margin:0 0 12px; }
.property-why { padding:12px 14px; border-left:3px solid #b79cff; background:#19263f; color:#d8e2f6; }
.property-why strong { color:#e9d7ff; }
.exam-code-pair { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:12px; margin:14px 0; }
.exam-code-pair>div { min-width:0; }
.exam-code-pair strong { color:#a6e9f2; }
.exam-code-pair pre { height:calc(100% - 25px); margin:5px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.flex-demo { display:flex; max-width:100%; overflow:auto; } .flex-demo span { flex-shrink:1; }
#justify-content .flex-demo { width:100%; min-height:150px; }
section[id^="pattern-"] { scroll-margin-top:130px; }
.exam-notice { margin:12px auto; padding:12px 16px; max-width:1200px; border:1px solid #65538e; border-radius:10px; background:#211a35; color:#e4d9ff; }
.exam-notice a { display:inline-block; margin-left:12px; color:#98eaf2; }
.exam-answer p { color:#d4e2f1; }
.exam-answer { margin:12px 0; padding:11px; border:1px solid #526a83; border-radius:10px; background:#15243a; color:#e8faff; } .exam-answer summary { cursor:pointer; color:#e8faff; font-weight:700; } .exam-answer pre { white-space:pre-wrap; }
.exam-case { margin:18px 0; padding:16px; border:1px solid #3d536f; border-radius:12px; background:#14243a; color:#e8faff; } .exam-case h3 { margin-top:0; color:#9de9df; } .exam-case p { color:#cbd8ec; }
.exam-case:target,.exam-turtle-card:target,.reading-solution:target { outline:3px solid #14b8a6; outline-offset:3px; }
.exam-solution-link { display:inline-block; margin:9px 0 14px; padding:8px 12px; border-radius:8px; background:#0e9f9a; color:#fff!important; text-decoration:none; font-weight:700; }
.exam-loop-result { margin:15px 0 0; padding:12px; border:1px solid #4b657a; border-radius:10px; background:#14243a; color:#e8faff; scroll-margin-top:15px; }
.exam-loop-result:target { outline:3px solid #14b8a6; }
.exam-loop-result pre { margin:8px 0 0; }
.exam-turtle { margin:28px 0; }
.exam-turtle-card { display:inline-block; vertical-align:top; width:min(100%,465px); margin:8px; padding:15px; border:1px solid #60718d; border-radius:12px; background:var(--surface); }
.exam-turtle-card h3 { margin:0 0 7px; }
.exam-turtle-card svg { display:block; width:100%; height:220px; margin:12px 0; border:1px solid #d1dae5; border-radius:9px; background:#fff; }
.exam-turtle-card pre,.exam-case pre { overflow:auto; white-space:pre-wrap; }
.exam-turtle-card pre { max-height:none; }
.path-parameter-lab .exam-case { display:block; }
.gap-exercise .exam-answer { grid-column:1/-1; }
.lab-panel,.lab-panel[hidden] { display:block!important; } .lab-panel { margin:18px 0!important; }
.guided-feedback:empty,.guided-test-results:empty,.reading-feedback:empty,.lab-output:empty { display:none!important; }
@media (max-width:900px) { .variant-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:600px) { html { scroll-padding-top:calc(28vh + 16px); } .property,.variant,section[id^="pattern-"] { scroll-margin-top:calc(28vh + 16px); } .property-nav { margin-left:-8px; margin-right:-8px; padding:8px; gap:6px; } .property-nav a { padding:6px 9px; font-size:11px; } }
@media print { body { background:white!important; color:#111!important; } a { color:#003f77!important; } .exam-answer { break-inside:avoid; } }

/* Preserve literal programming operators such as !=, <=, >= and ->. */
:root, :root * {
  font-variant-ligatures: none !important;
  font-feature-settings: 'liga' 0, 'calt' 0 !important;
}
