.systems-intro, .system-spread {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding-block: clamp(2.5rem, 5vw, 5rem);
}
.systems-intro h1, .system-lead h1 {
    margin: 0;
    font-size: clamp(2.65rem, 5.8vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -.055em;
}
.systems-intro > div > p, .system-lead > p:last-child {
    max-width: 39ch;
    margin: 1rem 0 0;
    color: #343e39;
    font-size: var(--type-lead);
    line-height: 1.5;
}
.system-medium { color: #414c46; font: 550 .9rem/1.5 var(--mono); }
.systems-feature, .system-demo {
    --frame: #20352f;
    --frame-text: #f4f7ee;
    --frame-line: #60776b;
    min-width: 0;
    background: var(--frame);
    color: var(--frame-text);
    border: 1px solid var(--frame);
    padding: clamp(1.1rem, 2.6vw, 2.4rem);
}
.sample-top, .studio-wrap .systems-feature figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .3rem 1rem;
}
.sample-top { padding-bottom: .8rem; border-bottom: 1px solid var(--frame-line); }
.sample-top strong { font: 650 1.1rem/1.3 var(--sans); }
.sample-top span, .patch-path, .explorer-preview h3 { font: 500 .9rem/1.45 var(--mono); }
.sample-patch {
    display: grid;
    align-content: center;
    margin: 1.25rem 0 .75rem;
    background: #182b25;
    padding: clamp(.75rem, 2vw, 1.4rem);
    border: 1px solid #50665b;
    font: 500 clamp(.875rem, 1.15vw, 1.05rem)/1.8 var(--mono);
    overflow-wrap: anywhere;
}
.patch-path { color: #d5e3d8; padding-bottom: .85rem; }
.sample-patch code { font: inherit; }
.patch-old { color: #f5c6af; }
.patch-new { color: #bce7b9; }
.studio-wrap :is(.systems-feature, .system-demo) figcaption {
    color: inherit;
    font: 400 .9375rem/1.5 var(--sans);
    padding-top: .7rem;
    border-top: 1px solid var(--frame-line);
}
.systems-feature figcaption a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-weight: 650; text-decoration: underline; }
.systems-feature figcaption span { align-self: center; }
.systems-index { padding-block: 1.25rem 0; border-top: 2px solid #253830; }
.systems-index h2 { margin: 0 0 1.2rem; }
.systems-index ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 5vw, 5rem); margin: 0; padding: 0; list-style: none; }
.systems-index li { border-top: 1px solid #a3ada7; scroll-margin-top: 1rem; }
.systems-index a { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: .25rem .75rem; padding: 1.2rem 0 1.5rem; color: var(--ink); }
.systems-index a strong { font: 650 clamp(1.5rem, 2.5vw, 2.25rem)/1.18 var(--sans); letter-spacing: -.035em; }
.systems-index .system-medium, .systems-index .system-description { grid-column: 1 / -1; }
.systems-index .system-description { grid-row: 3; max-width: 48ch; color: #354139; }
.index-arrow { grid-column: 2; grid-row: 2; color: var(--metro-accent); font-size: 1.4rem; }
.systems-index a:hover { text-decoration: none; }
.systems-index a:hover strong { text-decoration: underline; text-underline-offset: .15em; }
.system-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: .8rem; }
.system-spread { align-items: start; padding-block: clamp(1rem, 2.8vw, 2.8rem) clamp(2rem, 4.5vw, 4.5rem); }
.system-lead .system-medium { margin: 0 0 .8rem; }
.system-spread-chwal { grid-template-columns: minmax(0, 1fr); gap: clamp(1rem, 2.3vw, 2rem); }
.system-spread-chwal .system-lead {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    column-gap: clamp(1.5rem, 4vw, 4rem);
}
.system-spread-chwal .system-medium { grid-column: 1 / -1; margin-bottom: .45rem; }
.system-spread-chwal .system-lead h1 { font-size: clamp(2.7rem, 4.9vw, 4.5rem); }
.system-spread-chwal .system-lead > p:last-child { max-width: 37ch; margin: 0; }
.system-notes {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 1rem clamp(2rem, 5vw, 5rem);
    border-top: 1px solid #9ba59e;
    padding: clamp(1.25rem, 2.7vw, 2.5rem) 0;
}
.system-notes h2 { margin: 0; max-width: 22ch; }
.system-notes p { margin: 0 0 .8rem; max-width: 62ch; }
.system-demo section { padding: 1.2rem 0 .5rem; }
.system-demo h2 { margin: 0; color: inherit; font: 650 clamp(1.3rem, 2.2vw, 1.8rem)/1.25 var(--sans); letter-spacing: -.025em; }
.system-demo p { margin: .65rem 0 1rem; }
.system-demo [hidden], .harness-dialog [hidden] { display: none; }
.studio-wrap .chwal-desk :focus-visible, .studio-wrap .systems-feature :focus-visible { outline-color: #ffcd91; }
.system-demo button, .harness-dialog button {
    min-height: 44px;
    padding: .5rem .9rem;
    border: 1px solid currentColor;
    font: 600 1rem/1.35 var(--sans);
    color: inherit;
    background: transparent;
    cursor: pointer;
}
.chwal-desk { scroll-margin-top: 1.3rem; }
.chwal-desk .sample-top span { color: #c3d4c8; }
.desk-review-layout {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    grid-template-areas: "task code";
    column-gap: clamp(1rem, 3vw, 2.5rem);
}
.desk-review-task { grid-area: task; }
.chwal-desk .patch-context { color: #d5e3d8; font-size: .92em; }
.chwal-desk .patch-old { background: #3a3028; }
.chwal-desk .patch-new { background: #284431; }
.chwal-desk .sample-patch code { padding-inline: .4rem; }
.desk-review-task > p, .chwal-desk #harness-panel > p { max-width: 53ch; }
.desk-review-code {
    grid-area: code;
    min-width: 0;
    padding-left: clamp(1rem, 3vw, 2.5rem);
    border-left: 1px solid var(--frame-line);
}
.desk-review-code h3 { margin: 0; font: 600 1rem/1.4 var(--mono); color: #d5e3d8; }
.chwal-desk #harness-panel .desk-facts { max-width: 42rem; }
.desk-tabs { display: flex; gap: .35rem; margin: .6rem 0 0; border-bottom: 1px solid var(--frame-line); }
.desk-tabs a {
    display: inline-flex; align-items: center; min-height: 44px; padding-inline: .9rem;
    border-bottom: 3px solid transparent; color: #e8f0e9; font-weight: 600; text-decoration: none;
}
.desk-tabs a[aria-selected=true] { border-color: #c9e9ae; color: white; background: #2e463d; }
.desk-tabs a:hover { text-decoration: underline; text-underline-offset: .2em; }
.chwal-desk .desk-revisions { margin-bottom: 0; padding-block: .7rem; border-block: 1px solid var(--frame-line); }
.chwal-desk .desk-revisions code { font: 600 .95rem/1.4 var(--mono); }
.chwal-desk .sample-patch { margin-top: .8rem; }
.desk-file summary { display: flex; gap: .4rem; align-items: center; min-height: 44px; cursor: pointer; text-decoration: underline; }
.desk-file summary::before { content: "▸"; }
.desk-file[open] summary::before { content: "▾"; }
.desk-file pre {
    margin: .25rem 0 .75rem; padding: .7rem; background: #182b25; border: 1px solid #50665b;
    font: 500 .84rem/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.desk-note { border-top: 1px solid var(--frame-line); }
.desk-note label { display: block; font-weight: 600; }
.desk-note textarea { display: block; width: 100%; margin: .5rem 0; padding: .65rem; color: #182b25; background: #f7f8f2; border: 1px solid var(--frame-line); font: inherit; resize: vertical; }
.desk-note [role=status] { font-size: .94rem; }
.desk-branch { padding: .65rem 0 .2rem; }
.desk-branch p { margin-bottom: .55rem; color: #d5e3d8; }
.desk-actions, .dialog-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.desk-actions #select-harness { background: #d4ecc0; color: #1b3427; border-color: #d4ecc0; }
.desk-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin: 1.1rem 0; }
.desk-facts dt { font: 500 .9rem/1.5 var(--mono); }
.desk-facts dd { margin: .2rem 0 0; font-weight: 650; overflow-wrap: anywhere; }
.harness-dialog {
    box-sizing: border-box;
    width: min(29rem, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    border: 1px solid #566a5a;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: #f6f8f1;
    color: #202c24;
}
.harness-dialog::backdrop { background: rgb(16 27 22 / .64); }
.harness-dialog h2 { margin: 0; }
.harness-dialog p { margin: .5rem 0 1.25rem; }
.harness-dialog label { display: block; margin-top: .8rem; font-weight: 600; }
.harness-dialog input, .harness-dialog select { width: 100%; min-height: 44px; margin: .25rem 0; border: 1px solid #657368; background: white; color: #15211b; font: inherit; padding: .35rem .55rem; }
.dialog-actions { justify-content: flex-end; margin: 1.25rem 0 0; }
.harness-dialog button[type=submit] { background: #284037; color: white; }
.berry-desk { --frame: #e9edcf; --frame-text: #26391c; --frame-line: #93a079; }
.garden-screen { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .75rem; margin-bottom: .8rem; background: #2b422a; color: #dceeb1; padding: 1rem; font: 500 .9rem/1.4 var(--mono); }
.garden-grid { white-space: pre; font: 600 clamp(1rem, 2vw, 1.45rem)/1.3 var(--mono); }
.kosmos-desk { --frame: #e8eef3; --frame-text: #22333d; --frame-line: #95a8b4; }
.explorer-layout { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .75rem; margin-top: 1rem; }
.explorer-files { display: grid; align-content: start; gap: .35rem; }
.explorer-files button { text-align: left; font-family: var(--mono); }
.explorer-files button[aria-pressed=true] { background: #2c4557; color: white; }
.explorer-preview { min-height: 10rem; background: #fff; padding: 1rem; border: 1px solid var(--frame-line); }
.explorer-preview h3 { color: var(--frame-text); margin: 0 0 .6rem; }
.explorer-preview table { width: 100%; border-collapse: collapse; }
.explorer-preview :is(caption, th, td) { text-align: left; }
.explorer-preview :is(th, td) { border-bottom: 1px solid #becbd2; }
.assistant-desk { --frame: #f4ebdf; --frame-text: #413120; --frame-line: #af9f85; }
.assistant-desk blockquote { margin: 1rem 0; padding: 1rem; background: #fffaf2; font: var(--type-reading); }
.source-toggle { display: flex; gap: .65rem; min-height: 44px; align-items: center; cursor: pointer; }
.source-toggle input { width: 1.2rem; height: 1.2rem; accent-color: #614929; }
@media (max-width: 50rem) {
    .systems-intro, .system-spread, .system-notes { grid-template-columns: minmax(0, 1fr); }
    .systems-intro, .system-spread { gap: 1.5rem; }
    .desk-review-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "task" "code"; row-gap: .9rem; }
    .desk-review-code { border-left: 0; border-top: 1px solid var(--frame-line); padding: 1rem 0 0; }
}
@media (max-width: 37rem) {
    .systems-index ul, .explorer-layout { grid-template-columns: minmax(0, 1fr); }
    .explorer-files { display: flex; flex-wrap: wrap; }
    .garden-screen { grid-template-columns: 1fr; }
    .system-spread-chwal .system-lead { grid-template-columns: minmax(0, 1fr); }
    .system-spread-chwal .system-lead > p:last-child { margin-top: .6rem; }
    .desk-tabs a { flex: 1; justify-content: center; }
    .chwal-desk .desk-actions > button { flex: 1 0 8rem; }
    .harness-dialog .dialog-actions > button { flex: 1 1 7rem; }
}
