* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
}

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

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: .45rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.12;
    color: var(--text-strong);
}

h2 {
    margin-bottom: .35rem;
    font-size: 1.15rem;
    color: var(--text-strong);
}

h3 {
    color: var(--text-strong);
}

button,
input,
select {
    font: inherit;
}

input,
select {
    width: 100%;
    min-width: 0;
    min-height: var(--control-height);
    padding: .66rem .78rem;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 92, 171, .12);
}

input[type="checkbox"] {
    width: auto;
    min-height: 0;
    accent-color: var(--primary);
}

label {
    min-width: 0;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--control-height);
    padding: .66rem 1rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
}

.button:hover,
button:hover {
    background: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

button:disabled,
.button:disabled {
    cursor: wait;
    opacity: .65;
}

img,
canvas {
    max-width: 100%;
}

code,
pre {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin-inline: auto;
}

.number {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.positive {
    color: var(--positive);
}

.negative {
    color: var(--negative);
}

.muted {
    color: var(--muted);
}
