:root {
    --bg: #f4f4f4;       /* Soft off-white */
    --fg: #222222;       /* Dark gray for text */
    --accent: #b73232;   /* Muted dark red */
    --border: #333333;   /* Slightly lighter than black */
    --mono: "Courier New", Courier, monospace;
}

html {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--mono);
    font-size: 10pt;
    line-height: 1.6;
}

body {
    max-width: 85ch;
    margin: 2rem auto;
    padding: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    color: var(--border);
}

h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    font-family: var(--mono);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin: 0.1rem;
}

button:hover {
    background: var(--border);
    color: var(--bg);
}

code {
    text-decoration: underline var(--border);
}

pre {
    font-size: 8pt;
    background: var(--border);
    color: var(--bg);
    padding: 0.5rem;
    font-family: var(--mono);
    overflow-x: auto;
    border-left: 3px solid var(--accent);
    padding: 0.75rem;
}

/* --- Checkbox styling --- */
input[type="checkbox"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    position: relative;
    margin-right: 0.5rem;
}

input[type="checkbox"]:checked {
    background-color: var(--accent);
}

/* --- Range slider styling --- */
input[type="range"] {
    -webkit-appearance: none;
    width: 80%;
    background: transparent;
    cursor: pointer;
    margin-top: 0.2rem;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 0.4rem;
    background: var(--border);
    border-radius: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 0;
    background: var(--accent);
    border: 2px solid var(--border);
    margin-top: -0.35rem; /* centers thumb vertically */
    transition: background 0.2s;
}

input[type="range"]::-moz-range-track {
    height: 0.4rem;
    background: var(--border);
    border-radius: 0;
}

input[type="range"]::-moz-range-thumb {
    height: 1rem;
    width: 1rem;
    border-radius: 0;
    background: var(--accent);
    border: 2px solid var(--border);
}