.d20-intro { color: var(--muted); max-width: 60ch; margin: 8px 0 24px; }

/* Inputs row */
.d20-inputs { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 24px; }
.d20-field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); font-weight: 600; }
/* Inputs use .field (base.css); these are the d20-specific deltas. */
.d20-field input { font-size: 20px; width: 90px; font-variant-numeric: tabular-nums; }

/* Result */
.d20-result { text-align: center; margin: 8px 0 20px; }
.d20-pct {
    font-family: "Fraunces", Georgia, serif; font-weight: 600;
    font-size: clamp(48px, 12vw, 80px); line-height: 1; color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.d20-sub { color: var(--muted); margin-top: 4px; }
.d20-meta { color: var(--faint); font-size: 14px; margin-top: 10px; font-variant-numeric: tabular-nums; }

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

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

/* Advanced */
.d20-adv { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.d20-adv summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.d20-adv summary:hover { color: var(--accent); }
.d20-adv-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.d20-adv-label { font-size: 14px; color: var(--muted); font-weight: 600; min-width: 84px; }
.d20-add button, .d20-toggle {
    font: inherit; font-size: 13px; padding: 6px 11px; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text);
    transition: border-color .15s, background .15s, color .15s;
}
.d20-add button:hover, .d20-toggle:hover { border-color: var(--accent); }
.d20-toggle[aria-pressed="true"] { background: var(--accent-weak); color: var(--accent-strong); border-color: var(--accent); font-weight: 600; }
.d20-dice { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.d20-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500;
    padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--accent-weak); color: var(--accent-strong);
}
.d20-chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 13px; line-height: 1; padding: 0 2px; display: inline-flex; align-items: center; }
