/* Reset + element defaults for the v2 design. */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--v2-bg);
    background-image: var(--v2-bg-accent);
    color: var(--v2-text);
    font-family: var(--v2-font-sans);
    font-size: var(--v2-text-base);
    line-height: var(--v2-leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: var(--v2-weight-semibold);
    line-height: var(--v2-leading-tight);
    letter-spacing: -0.015em;
    color: var(--v2-text);
}

h1 {
    font-size: var(--v2-text-3xl);
}
h2 {
    font-size: var(--v2-text-2xl);
}
h3 {
    font-size: var(--v2-text-xl);
}
h4 {
    font-size: var(--v2-text-lg);
}
h5 {
    font-size: var(--v2-text-md);
}
h6 {
    font-size: var(--v2-text-sm);
}

p {
    margin: 0 0 var(--v2-space-4);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--v2-link);
    text-decoration: none;
    transition: color var(--v2-dur-fast) var(--v2-ease);
}

a:hover {
    color: var(--v2-link-hover);
    text-decoration: underline;
}

:where(a:visited) {
    color: var(--v2-link-visited);
}

ul,
ol {
    margin: 0 0 var(--v2-space-4);
    padding-left: var(--v2-space-6);
}

li + li {
    margin-top: var(--v2-space-1);
}

hr {
    height: 1px;
    margin: var(--v2-space-6) 0;
    border: 0;
    background: var(--v2-border);
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

code,
kbd,
pre,
samp {
    font-family: var(--v2-font-mono);
    font-size: 0.9em;
}

code {
    padding: 0.15em 0.4em;
    border: 1px solid var(--v2-border-subtle);
    border-radius: var(--v2-radius-xs);
    background: var(--v2-surface-inset);
}

pre {
    overflow-x: auto;
    margin: 0 0 var(--v2-space-4);
    padding: var(--v2-space-4);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-md);
    background: var(--v2-surface-inset);
}

pre code {
    padding: 0;
    border: 0;
    background: none;
}

small {
    font-size: var(--v2-text-xs);
}

strong,
b {
    font-weight: var(--v2-weight-semibold);
    color: var(--v2-text);
}

/* Numeric data lines up in tables and stat blocks. */
.tnum,
table td,
table th {
    font-variant-numeric: tabular-nums;
}

:focus-visible {
    outline: 2px solid var(--v2-accent);
    outline-offset: 2px;
    border-radius: var(--v2-radius-xs);
}

::selection {
    background: var(--v2-accent-soft);
    color: var(--v2-text);
}

/* ---- Scrollbars ---- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--v2-surface-4) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: var(--v2-radius-full);
    background: var(--v2-surface-4);
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--v2-border-strong);
    background-clip: content-box;
}

/* ---- Form element baseline ---- */
button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
}

button:disabled {
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

/* ---- Utilities ---- */
.v2-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

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

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

.v2-eyebrow {
    font-size: var(--v2-text-xs);
    font-weight: var(--v2-weight-semibold);
    letter-spacing: var(--v2-tracking-caps);
    text-transform: uppercase;
    color: var(--v2-text-dim);
}

.v2-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[hidden] {
    display: none !important;
}
