.dist-intro { color: var(--muted); max-width: 64ch; margin: 8px 0 24px; }
.dist-intro code { font-size: .92em; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* Inputs */
.dist-form { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 14px; }
.dist-field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); font-weight: 600; }
.dist-field input { font-size: 20px; font-variant-numeric: tabular-nums; }
.dist-field-wide { flex: 1; min-width: 220px; }
.dist-field-wide input { width: 100%; }

/* Presets */
.dist-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.dist-presets button {
    font: inherit; font-size: 13px; padding: 6px 12px; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text);
    transition: border-color .15s, background .15s, color .15s;
}
.dist-presets button:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Error */
.dist-error { color: var(--accent-strong); background: var(--accent-weak); border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; }

/* Stats */
.dist-stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 22px; padding: 0; }
.dist-stats li { text-align: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.dist-stats b { display: block; font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.dist-stats span { font-size: 12px; color: var(--faint); }

/* Distribution chart (mirrors the d20 odds chart) */
.dist-chart {
    display: flex; align-items: flex-end; gap: 1px; height: 160px;
    padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.dist-bar { flex: 1; min-width: 1px; background: var(--border-strong); border-radius: 2px 2px 0 0; transition: height .2s; }
.dist-bar.is-hit { background: var(--accent); }
.dist-chart-cap { font-size: 13px; color: var(--faint); text-align: center; margin: 8px 0 4px; min-height: 1.2em; }

@media (min-width: 560px) {
    .dist-stats { grid-template-columns: repeat(6, 1fr); }
}
