*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* Reserves the scrollbar's width up front so it never appears/disappears
   mid-session — without this, the boot overlay's viewport-centered content
   shifts sideways the moment the (already-mounted, just hidden) pages behind
   it grow tall enough to add a scrollbar. overflow-y is the fallback for
   browsers without scrollbar-gutter support. */
html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    margin: 0 0 8px;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 20px;
}

h2 {
    font-size: 16px;
}

p {
    margin: 0 0 8px;
}

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

a:hover {
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
    color: inherit;
}

button {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 5px 12px;
    cursor: pointer;
}

button:hover:not(:disabled) {
    border-color: var(--accent);
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}

.button-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Compact variant for secondary row-level actions (Settings' Reset buttons,
   FilterBar's Reset/Collapse, Wishlist's Import/Export) — matches the 24px
   row height of the controls they sit next to, instead of the base button
   rule's 5px 12px padding. */
.btn-compact {
    height: 24px;
    padding: 0 8px;
}

.text-dim {
    color: var(--text-dim);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
