/* Ben: gradient name with a size slider. The slider sets --size (10 to 100) on <html>; see app.js. */
:root {
    --size: 60;
    --gradient: linear-gradient(100deg, #4f46e5 0%, #c026d3 50%, #f97316 100%);
    --bg: #f7f7fb;
    --panel: #ffffff;
    --line: #e4e4ec;
    --ink: #1c1b29;
    --muted: #6b6a7d;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --gradient: linear-gradient(100deg, #818cf8 0%, #e879f9 50%, #fb923c 100%);
        --bg: #0d0c14;
        --panel: #17161f;
        --line: #2a2937;
        --ink: #f1f0f7;
        --muted: #9a99ad;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 1fr auto;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.stage {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
}

/* 100% is the largest size that still fits the screen, on a phone as well as on a wide monitor. */
.name {
    margin: 0;
    padding: 0.06em 0.08em;
    font-size: calc(var(--size) / 100 * min(46vw, 62vh));
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    white-space: nowrap;
    color: #c026d3; /* shown only where gradient text is not supported */
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.controls {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(560px, calc(100% - 32px));
    margin: 0 auto 24px;
    padding: 14px 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(20, 18, 40, 0.06);
}

.label {
    font-size: 15px;
    font-weight: 600;
}

.hint {
    font-weight: 700;
    line-height: 1;
    color: var(--muted);
    user-select: none;
}

.hint-small {
    font-size: 12px;
}

.hint-large {
    font-size: 22px;
}

.value {
    min-width: 4ch;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--muted);
}

.slider {
    flex: 1;
    min-width: 0;
    height: 28px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: var(--gradient);
}

.slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: var(--gradient);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    margin-top: -8px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--panel);
    box-shadow: 0 2px 6px rgba(20, 18, 40, 0.25);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--panel);
    box-shadow: 0 2px 6px rgba(20, 18, 40, 0.25);
}

.slider:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
    border-radius: 999px;
}

@media (max-width: 420px) {
    .controls {
        gap: 8px;
        padding: 12px 14px;
        margin-bottom: 16px;
    }
}
