:root {
	--bg: #ffffff;
	--fg: #1b1b1f;
	--muted: #4a4d57;
	--line: #c9ccd4;
	--panel: #f3f4f7;
	--link: #1a4fb4;
	--focus: #1a4fb4;
	--note-bg: #fff6dc;
	--note-line: #8a6100;
	color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
code, kbd, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.3em; background: var(--panel); }
pre { background: var(--panel); padding: 0.8rem 1rem; overflow-x: auto; border-radius: 6px; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--fg); color: #fff; padding: 0.5rem 1rem; border-radius: 0 0 6px 6px; z-index: 10; }
.skip:focus { top: 0; }

.site-header { border-bottom: 1px solid var(--line); padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; }
.brand { margin: 0; font-weight: 700; font-size: 1.15rem; }
.brand a { color: var(--fg); text-decoration: none; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-header a[aria-current="page"] { color: var(--fg); font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--fg); }

main { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
main.wide { max-width: none; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
h4, h5, h6 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
p, li { max-width: 46rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.note { border-left: 4px solid var(--note-line); background: var(--note-bg); padding: 0.75rem 1rem; margin: 1rem 0; max-width: 46rem; }
blockquote { border-left: 4px solid var(--line); margin: 1rem 0; padding: 0.25rem 1rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding-bottom: 0.4rem; }
th, td { border: 1px solid var(--line); padding: 0.35rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--panel); }

.demo { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.5rem; align-items: start; }
.demo-chart { min-width: 0; }
.chart-box { width: 100%; height: 30rem; border: 1px solid var(--line); }
.frappe-layout { display: flex; gap: 0.75rem; }
.frappe-layout .tasks { width: 14rem; flex: none; }
.frappe-layout .tasks [role="listbox"] { border: 1px solid var(--line); }
.frappe-layout .tasks [role="option"] { padding: 0 0.5rem; height: 38px; line-height: 38px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frappe-layout .tasks [role="option"][aria-selected="true"] { background: #e3eafa; }
.frappe-layout .tasks [role="option"]:focus { outline: 3px solid var(--focus); outline-offset: -3px; }
.frappe-layout #chart { flex: 1; min-width: 0; overflow: auto; }
.switch { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; }
button { font: inherit; padding: 0.4rem 1rem; border: 2px solid var(--fg); background: var(--bg); color: var(--fg); border-radius: 6px; cursor: pointer; }
button[aria-pressed="true"] { background: var(--fg); color: #fff; }
.keys { font-size: 0.92rem; }
.keys td:first-child { white-space: nowrap; }

footer { border-top: 1px solid var(--line); padding: 1rem; color: var(--muted); font-size: 0.95rem; }
footer p { max-width: 72rem; margin: 0.25rem auto; }

@media (max-width: 60rem) {
	.demo { grid-template-columns: minmax(0, 1fr); }
	h1 { font-size: 1.6rem; }
}
