.sketch-section,
.language-section,
.studio-section,
.site-footer {
    position: relative;
    z-index: 2;
}

.sketch-section {
    padding: 140px 0;
    border-bottom: 1px solid var(--line);
    background: var(--ink-2);
}

.section-title {
    display: grid;
    grid-template-columns: 0.42fr 1.1fr 0.48fr;
    gap: 40px;
    align-items: end;
    margin-bottom: 70px;
}

.section-title > p,
.language-copy > p,
.studio-copy > p {
    margin: 0;
    color: #8f958e;
    font: 500 0.62rem/1.4 var(--mono);
    letter-spacing: 0.14em;
}

.section-title h2,
.language-copy h2,
.studio-copy h2 {
    margin: 0;
    font-size: clamp(3.6rem, 6.6vw, 7.5rem);
    font-weight: 600;
    letter-spacing: -0.08em;
    line-height: 0.88;
}

.section-title h2 span {
    color: var(--coral);
}

.section-title > small {
    max-width: 300px;
    color: #9aa098;
    font-size: 0.86rem;
    line-height: 1.65;
}

.sketch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.sketch-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #454c45;
    background: var(--ink-1);
}

.sketch-card-wide {
    grid-column: 1 / -1;
}

.sketch-card header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    min-height: 44px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    font: 500 0.58rem/1 var(--mono);
}

.sketch-card header span,
.sketch-card header strong,
.sketch-card header i,
.sketch-card header button {
    padding: 0 15px;
}

.sketch-card header span {
    color: var(--blue);
    letter-spacing: 0.08em;
}

.sketch-card header strong {
    overflow: hidden;
    color: #a9afa8;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sketch-card header i {
    color: var(--acid);
    font-style: normal;
    letter-spacing: 0.08em;
}

.sketch-card header button {
    align-self: stretch;
    border: 0;
    border-left: 1px solid var(--line);
    background: var(--acid);
    color: var(--ink);
    cursor: pointer;
    font: 500 0.57rem/1 var(--mono);
}

.sketch-card header button:hover:not(:disabled) {
    background: var(--sky);
}

.sketch-card-body {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(380px, 1.2fr);
    min-height: 300px;
}

.sketch-card-body .sketch-source-pane {
    border-right: 1px solid var(--line);
}

.sketch-source-pane {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sketch-source-pane .snippet-editor-shell {
    flex: 1;
    min-height: 0;
}

.sketch-source-pane .snippet-editor {
    min-height: 0;
    padding: 32px 34px;
    font-size: clamp(0.66rem, 0.95vw, 0.8rem);
}

.type-rhythm {
    display: grid;
    align-content: center;
    overflow: hidden;
    padding: 25px 0;
    background: var(--paper);
    color: var(--ink);
}

.type-rhythm span {
    font-size: clamp(3.5rem, 7.5vw, 7.8rem);
    font-weight: 800;
    letter-spacing: -0.09em;
    line-height: 0.62;
    white-space: nowrap;
}

.type-rhythm span:first-child {
    color: var(--blue);
    transform: translateX(-3%);
}

.type-rhythm span:nth-child(2) {
    color: var(--coral);
    text-align: center;
}

.type-rhythm span:last-child {
    color: var(--ink);
    transform: translateX(20%);
}

.sketch-card:not(.sketch-card-wide) {
    display: grid;
    grid-template-rows: auto minmax(250px, auto) 210px;
}

.sketch-card:not(.sketch-card-wide) .sketch-source-pane {
    border-bottom: 1px solid var(--line);
}

.color-output {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
    background: var(--blue);
    color: var(--white);
}

.color-output::after {
    position: absolute;
    top: -80px;
    right: -30px;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    content: "";
}

.color-output span,
.color-output strong {
    position: relative;
    z-index: 1;
    font-size: clamp(2.8rem, 6vw, 6rem);
    letter-spacing: -0.08em;
    line-height: 0.8;
}

.color-output span {
    font-weight: 400;
}

.color-output strong {
    color: var(--sky);
    font-weight: 800;
}

.sketch-card-signal {
    background: var(--paper);
    color: var(--ink);
}

.sketch-card-signal header {
    border-color: #c2c0b7;
}

.sketch-card-signal header strong {
    color: #555b55;
}

.sketch-card-signal .sketch-source-pane {
    border-color: #c2c0b7 !important;
}

.sketch-card-signal .snippet-editor {
    color: var(--ink);
    caret-color: var(--blue);
}

.sketch-card-signal .snippet-editor-shell {
    --snippet-default: var(--ink);
    --snippet-function: #2150b9;
    --snippet-section: #795800;
    --snippet-variable: #272d28;
    --snippet-comment: #777b74;
    --snippet-pattern: #304fc3;
    --snippet-number: #5c49b5;
    --snippet-string: #865800;
    --snippet-intrinsic: #477000;
    --snippet-type: #a33a27;
    --snippet-keyword: #b83a2f;
}

.sketch-card-signal .snippet-editor:focus {
    background: rgba(102, 115, 255, 0.05);
    box-shadow: inset 0 0 0 1px var(--blue);
}

.sketch-card-signal .snippet-diagnostics {
    background: rgba(197, 58, 48, 0.08);
    color: #9e2f27;
}

.signal-output {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: var(--acid);
    color: var(--ink);
}

.signal-output i {
    width: 42px;
    height: 42px;
    border: 9px solid var(--ink);
    border-radius: 50%;
}

.signal-output span {
    font-size: clamp(2.7rem, 5vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.07em;
}

.language-section {
    padding: 150px 0;
    overflow: hidden;
    background: var(--blue);
    color: var(--white);
}

.language-section::before {
    position: absolute;
    top: -300px;
    right: -150px;
    width: 780px;
    height: 780px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    content: "";
}

.language-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(320px, 0.62fr) minmax(580px, 1.38fr);
    gap: clamp(60px, 9vw, 150px);
    align-items: center;
}

.language-copy h2 {
    margin-top: 24px;
    font-size: clamp(3.6rem, 5.9vw, 6.8rem);
}

.language-copy > p {
    color: rgba(255, 255, 255, 0.64);
}

.language-copy > span,
.studio-copy > span {
    display: block;
    max-width: 500px;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.94rem;
    line-height: 1.75;
}

.language-board {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: var(--ink-1);
    box-shadow: 11px 11px 0 var(--acid);
}

.lab-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--line);
}

.lab-tabs button {
    min-height: 48px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: #767d75;
    cursor: pointer;
    font: 500 0.62rem/1 var(--mono);
    letter-spacing: 0.11em;
}

.lab-tabs button:last-child {
    border-right: 0;
}

.lab-tabs button[aria-selected="true"] {
    background: var(--acid);
    color: var(--ink);
}

.language-execute {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid var(--line);
    color: #858c84;
    font: 500 0.57rem/1 var(--mono);
    letter-spacing: 0.08em;
}

.language-execute span {
    padding: 0 16px;
}

.language-execute button {
    align-self: stretch;
    min-width: 130px;
    border: 0;
    border-left: 1px solid var(--line);
    background: var(--acid);
    color: var(--ink);
    cursor: pointer;
    font: 500 0.58rem/1 var(--mono);
}

.language-execute button:hover:not(:disabled) {
    background: var(--sky);
}

.lab-panel {
    min-height: 360px;
    padding: 50px;
}

.lab-panel[hidden] {
    display: none;
}

.panel-tag {
    display: block;
    color: #858c84;
    font: 500 0.58rem/1 var(--mono);
    letter-spacing: 0.1em;
}

.language-snippet-editor-shell {
    height: 280px;
    margin-top: 28px;
}

.language-snippet-editor {
    padding: 20px;
    font-size: clamp(0.72rem, 1.15vw, 0.9rem);
}

.language-diagnostics {
    border-right: 0;
    border-left: 0;
}

.lexicon-strip {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    overflow: hidden;
    border-top: 1px solid var(--line);
    color: #899087;
    font: 400 0.58rem/1 var(--mono);
    white-space: nowrap;
}

.lexicon-strip > span {
    color: var(--coral);
}

.lexicon-strip pre {
    margin: 0;
    overflow: hidden;
    color: var(--acid);
    font: inherit;
    text-overflow: ellipsis;
}

.studio-section {
    padding: 150px 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--ink);
}

.studio-shell {
    display: grid;
    grid-template-columns: minmax(600px, 1.35fr) minmax(320px, 0.65fr);
    gap: clamp(60px, 8vw, 130px);
    align-items: center;
}

.studio-window {
    border: 1px solid #515851;
    background: var(--ink-1);
    box-shadow: 10px 10px 0 var(--coral);
}

.studio-bar {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    min-height: 46px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    font: 500 0.58rem/1 var(--mono);
}

.studio-bar span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
}

.studio-bar img {
    width: 24px;
    height: 24px;
}

.studio-bar i {
    color: #7e857d;
    font-style: normal;
}

.studio-bar b {
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 0 15px;
    background: var(--acid);
    color: var(--ink);
}

.studio-body {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr) 170px;
    min-height: 430px;
}

.studio-files,
.studio-output {
    padding: 18px 12px;
    font: 400 0.55rem/1.5 var(--mono);
}

.studio-files {
    border-right: 1px solid var(--line);
    color: #6f766e;
}

.studio-files strong {
    display: block;
    margin-top: 20px;
    color: #d2d6d0;
    font-weight: 400;
}

.studio-files strong::first-letter {
    color: var(--acid);
}

.studio-code {
    padding: 35px 20px;
    color: #d8dcd6;
    font: 400 0.67rem/1.9 var(--mono);
}

.studio-code > span {
    display: block;
    white-space: nowrap;
}

.studio-code i {
    display: inline-block;
    width: 30px;
    color: #444b44;
    font-style: normal;
}

.studio-code b { color: var(--acid); font-weight: 400; }
.studio-code em { color: var(--coral); font-style: normal; }

.studio-output {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--line);
    background: #0a0c0a;
    color: #737a72;
}

.studio-output strong {
    margin: auto 0 0;
    color: var(--sky);
    font-size: 4rem;
    letter-spacing: -0.08em;
}

.studio-output small {
    color: var(--acid);
    font: 400 0.55rem/1 var(--mono);
}

.studio-copy h2 {
    margin-top: 24px;
    font-size: clamp(3.6rem, 5.7vw, 6.5rem);
}

.studio-copy > span {
    color: #a3a9a1;
}

.studio-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 28px;
}

.studio-signals i {
    padding: 7px 9px;
    border: 1px solid #424942;
    color: #969d95;
    font: 400 0.56rem/1 var(--mono);
    letter-spacing: 0.06em;
    font-style: normal;
}

.studio-copy > a {
    display: flex;
    max-width: 270px;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    margin-top: 35px;
    padding: 0 15px;
    border: 1px solid #747b73;
    font: 500 0.68rem/1 var(--mono);
    transition: background-color 140ms ease, color 140ms ease;
}

.studio-copy > a span {
    color: var(--acid);
}

.studio-copy > a:hover {
    background: var(--white);
    color: var(--ink);
}

.site-footer {
    padding: 45px 0;
    background: var(--ink-1);
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 60px;
    align-items: center;
}

.footer-inner > p {
    margin: 0;
    color: #7f867e;
    font-size: 0.73rem;
}

.footer-inner nav {
    display: flex;
    gap: 24px;
    color: #a0a69f;
    font-size: 0.68rem;
}

.footer-inner nav a:hover {
    color: var(--sky);
}

.footer-state {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #798078;
    font: 500 0.55rem/1 var(--mono);
    letter-spacing: 0.08em;
}

.reveal {
    opacity: 1;
    transform: none;
}

.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 520ms ease, transform 520ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
