Fix folder stack overlap: pull slots, split tab/body sticky.

Sections overlap via negative margin; tabs stay in staggered rail;
active body z-index covers layers below as you scroll.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-20 23:05:20 -04:00
co-authored by Cursor
parent acfc6ddd86
commit bb8469ca10
10 changed files with 720 additions and 246 deletions
+300 -19
View File
@@ -1,19 +1,89 @@
:root {
/* --- themes --- */
:root,
[data-theme="light"] {
color-scheme: light;
--paper: #f4f1ec;
--surface: #ffffff;
--ink: #1a1a18;
--muted: #5c5a56;
--rule: #d4cfc6;
--accent: #2a4a6b;
--accent-bg: #e8eef4;
--muted: #4a4844;
--rule: #c8c2b8;
--accent: #1e4a72;
--accent-hover: #163a5c;
--accent-bg: #e4ecf4;
--link: #1e4a72;
--link-hover: #163a5c;
--badge-ok-bg: #c8e6ce;
--badge-ok-fg: #14532d;
--badge-post-bg: #f5dcc8;
--badge-post-fg: #6b3410;
--focus: #1e4a72;
--skip-bg: #1a1a18;
--skip-fg: #f4f1ec;
}
[data-theme="dim"] {
color-scheme: light;
--paper: #ddd8cf;
--surface: #ece8e0;
--ink: #1f1d1a;
--muted: #45423c;
--rule: #b5aea2;
--accent: #2a5078;
--accent-hover: #1e3d5c;
--accent-bg: #d4dde8;
--link: #2a5078;
--link-hover: #1e3d5c;
--badge-ok-bg: #b8d4be;
--badge-ok-fg: #14532d;
--badge-post-bg: #e8cdb8;
--badge-post-fg: #5c3010;
--focus: #2a5078;
--skip-bg: #1f1d1a;
--skip-fg: #ece8e0;
}
[data-theme="dark"] {
color-scheme: dark;
--paper: #141412;
--surface: #1e1e1c;
--ink: #ece9e4;
--muted: #b8b4ac;
--rule: #3a3834;
--accent: #7eb8e8;
--accent-hover: #a8d4f8;
--accent-bg: #243040;
--link: #8ec8f0;
--link-hover: #b8e0ff;
--badge-ok-bg: #1e4a2e;
--badge-ok-fg: #a8e8b8;
--badge-post-bg: #4a3020;
--badge-post-fg: #f0d0b0;
--focus: #8ec8f0;
--skip-bg: #ece9e4;
--skip-fg: #141412;
}
:root {
--font-scale: 1;
--mono: 'IBM Plex Mono', ui-monospace, monospace;
--serif: 'Literata', Georgia, serif;
--focus-ring: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
font-size: calc(100% * var(--font-scale));
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
}
body {
display: grid;
grid-template-columns: 200px 1fr;
grid-template-columns: minmax(12rem, 220px) 1fr;
min-height: 100vh;
background: var(--paper);
color: var(--ink);
@@ -22,10 +92,64 @@ body {
line-height: 1.65;
}
/* screen reader only */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.skip-link {
position: absolute;
top: 0.5rem;
left: 0.5rem;
z-index: 100;
padding: 0.6rem 1rem;
background: var(--skip-bg);
color: var(--skip-fg);
font-family: var(--mono);
font-size: 0.8rem;
text-decoration: none;
border-radius: 2px;
transform: translateY(-200%);
transition: transform 0.15s;
}
.skip-link:focus {
transform: translateY(0);
outline: 3px solid var(--focus);
outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
.code-block:focus-visible {
outline: 3px solid var(--focus);
outline-offset: 2px;
}
a {
color: var(--link);
text-decoration-thickness: 1px;
text-underline-offset: 0.15em;
}
a:hover {
color: var(--link-hover);
}
@media (max-width: 800px) {
body { grid-template-columns: 1fr; }
.toc {
position: static !important;
height: auto !important;
border-bottom: 1px solid var(--rule);
padding: 1rem 1.5rem !important;
}
@@ -37,40 +161,188 @@ body {
position: sticky;
top: 0;
height: 100vh;
overflow-y: auto;
padding: 2rem 1.25rem;
border-right: 1px solid var(--rule);
font-family: var(--mono);
font-size: 0.7rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.back {
display: block;
color: var(--muted);
text-decoration: none;
margin-bottom: 1.5rem;
margin-bottom: 0.5rem;
min-height: 2.75rem;
line-height: 2.75rem;
}
.back:hover { color: var(--accent); }
.toc-title {
font-size: 0.65rem;
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 0.25rem;
}
.toc nav {
display: flex;
flex-direction: column;
gap: 0.35rem;
gap: 0.15rem;
}
.toc nav a {
color: var(--ink);
text-decoration: none;
padding: 0.35rem 0.25rem;
min-height: 2.75rem;
display: flex;
align-items: center;
border-radius: 2px;
}
.toc nav a:hover { color: var(--accent); }
.toc nav a.is-active {
font-weight: 600;
color: var(--accent);
background: var(--accent-bg);
}
/* preferences */
.prefs {
margin-top: auto;
padding-top: 1rem;
border-top: 1px solid var(--rule);
}
.prefs-heading {
font-size: 0.65rem;
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 0.6rem;
}
.theme-field {
border: 0;
margin: 0 0 0.75rem;
padding: 0;
}
.theme-legend {
font-size: 0.62rem;
color: var(--muted);
margin-bottom: 0.35rem;
}
.theme-options {
display: flex;
gap: 0.25rem;
}
.theme-option {
flex: 1;
cursor: pointer;
}
.theme-option input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.theme-option span {
display: flex;
align-items: center;
justify-content: center;
min-height: 2.75rem;
padding: 0.35rem 0.25rem;
border: 1px solid var(--rule);
background: var(--surface);
color: var(--ink);
text-align: center;
border-radius: 2px;
transition: background 0.12s, border-color 0.12s;
}
.theme-option input:checked + span {
border-color: var(--accent);
background: var(--accent-bg);
font-weight: 600;
color: var(--accent);
}
.theme-option input:focus-visible + span {
outline: 3px solid var(--focus);
outline-offset: 2px;
}
.font-controls {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.35rem 0.5rem;
}
.font-label {
width: 100%;
font-size: 0.62rem;
color: var(--muted);
}
.font-buttons {
display: flex;
gap: 0.25rem;
}
.font-btn {
font-family: var(--mono);
font-size: 0.75rem;
min-width: 2.75rem;
min-height: 2.75rem;
padding: 0.35rem 0.5rem;
border: 1px solid var(--rule);
background: var(--surface);
color: var(--ink);
cursor: pointer;
border-radius: 2px;
}
.font-btn:hover:not(:disabled) {
background: var(--accent-bg);
border-color: var(--accent);
}
.font-btn:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.font-scale-readout {
font-size: 0.62rem;
color: var(--muted);
min-width: 2.5rem;
}
.meta {
margin-top: 2rem;
margin-top: 0.75rem;
color: var(--muted);
line-height: 1.5;
}
.main {
min-width: 0;
}
.rfc {
max-width: 42rem;
padding: 3rem 2.5rem 5rem;
@@ -121,8 +393,8 @@ body {
font-family: var(--mono);
font-size: 0.65rem;
padding: 0.15rem 0.45rem;
background: #d4edda;
color: #1e5631;
background: var(--badge-ok-bg);
color: var(--badge-ok-fg);
letter-spacing: 0.04em;
}
@@ -167,7 +439,7 @@ section p { margin-bottom: 0.75rem; color: var(--ink); }
.endpoint {
border: 1px solid var(--rule);
margin: 1.25rem 0;
background: #fff;
background: var(--surface);
}
.endpoint-head {
@@ -184,8 +456,8 @@ section p { margin-bottom: 0.75rem; color: var(--ink); }
.method {
font-weight: 600;
color: #1e5631;
background: #d4edda;
color: var(--badge-ok-fg);
background: var(--badge-ok-bg);
padding: 0.15rem 0.4rem;
font-size: 0.7rem;
}
@@ -194,6 +466,7 @@ section p { margin-bottom: 0.75rem; color: var(--ink); }
.ext { margin-left: auto; font-size: 0.75rem; }
.ext a { color: var(--muted); }
.ext a:hover { color: var(--link); }
.endpoint > p,
.endpoint > ul {
@@ -208,11 +481,17 @@ section p { margin-bottom: 0.75rem; color: var(--ink); }
font-size: 0.85rem;
}
.table-wrap {
overflow-x: auto;
margin-top: 0.75rem;
-webkit-overflow-scrolling: touch;
}
.spec-table {
width: 100%;
min-width: 20rem;
border-collapse: collapse;
font-size: 0.9rem;
margin-top: 0.75rem;
}
.spec-table th,
@@ -235,7 +514,7 @@ section p { margin-bottom: 0.75rem; color: var(--ink); }
color: var(--accent);
}
.spec-table a { color: var(--accent); }
.spec-table a { color: var(--link); }
.contact-grid {
display: grid;
@@ -259,16 +538,18 @@ section p { margin-bottom: 0.75rem; color: var(--ink); }
font-family: var(--mono);
font-size: 0.85rem;
transition: background 0.15s;
min-height: 2.75rem;
}
.contact-card:hover {
.contact-card:hover,
.contact-card:focus-visible {
background: var(--accent-bg);
}
.method.post {
font-weight: 600;
color: #8b4513;
background: #fde8d8;
color: var(--badge-post-fg);
background: var(--badge-post-bg);
align-self: flex-start;
padding: 0.1rem 0.35rem;
font-size: 0.65rem;