@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/instrument/instrument-sans-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --zqr-brand-start: #9810fa;
    --zqr-brand-end: #4f39f6;
    --zqr-radius-scale: 1;
    --zqr-font-sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --zqr-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --zqr-brand-gradient: linear-gradient(to right, var(--zqr-brand-start), var(--zqr-brand-end));
    --zqr-brand-gradient-hover: linear-gradient(to right, color-mix(in oklch, var(--zqr-brand-start), black 12%), color-mix(in oklch, var(--zqr-brand-end), black 12%));
    --zqr-brand: var(--zqr-brand-end);
    --zqr-brand-strong: color-mix(in oklch, var(--zqr-brand-end), black 12%);
    --zqr-brand-text: var(--zqr-brand-end);
    --zqr-brand-soft: color-mix(in oklch, var(--zqr-brand-end) 7%, white);
    --zqr-brand-border: color-mix(in oklch, var(--zqr-brand-end) 55%, white);
    --zqr-on-brand: #fff;

    --zqr-danger: oklch(0.586 0.253 17.585);
    --zqr-danger-strong: oklch(0.514 0.222 16.935);
    --zqr-success: oklch(0.596 0.145 163.225);
    --zqr-success-strong: oklch(0.508 0.118 165.612);

    --zqr-surface: #fff;
    --zqr-surface-muted: oklch(0.984 0.003 247.858);
    --zqr-text: oklch(0.208 0.042 265.755);
    --zqr-text-soft: oklch(0.372 0.044 257.287);
    --zqr-text-muted: oklch(0.554 0.046 257.417);
    --zqr-border: oklch(0.929 0.013 255.508);
    --zqr-border-strong: oklch(0.869 0.022 252.894);

    --zqr-notice-success-bg: oklch(0.979 0.021 166.113);
    --zqr-notice-success-border: oklch(0.905 0.093 164.15);
    --zqr-notice-success-text: oklch(0.432 0.095 166.913);
    --zqr-notice-error-bg: oklch(0.969 0.015 12.422);
    --zqr-notice-error-border: oklch(0.892 0.058 10.001);
    --zqr-notice-error-text: oklch(0.455 0.188 13.697);

    --zqr-radius-inner: calc(12px * var(--zqr-radius-scale));
    --zqr-radius-control: calc(20px * var(--zqr-radius-scale));
    --zqr-radius-card: calc(28px * var(--zqr-radius-scale));
    --zqr-radius-pill: 9999px;

    --zqr-control-height: 44px;
    --zqr-control-height-compact: 36px;
    --zqr-control-padding: 0.5rem 1rem;
    --zqr-field-padding: 0.5rem 0.75rem;
    --zqr-text-size: 0.875rem;
    --zqr-text-line: 1.25rem;

    --zqr-shadow-card: 0 1px 2px 0 rgb(15 23 42 / 0.04);
    --zqr-shadow-raised: 0 4px 12px -2px rgb(15 23 42 / 0.06), 0 2px 4px -2px rgb(15 23 42 / 0.04);
    --zqr-shadow-overlay: 0 16px 40px -8px rgb(15 23 42 / 0.1), 0 6px 16px -6px rgb(15 23 42 / 0.06);

    --zqr-page-backdrop: radial-gradient(at 40% 20%, hsla(28, 100%, 74%, 0.3) 0px, transparent 50%), radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.3) 0px, transparent 50%), radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 0.3) 0px, transparent 50%), radial-gradient(at 80% 50%, hsla(340, 100%, 76%, 0.3) 0px, transparent 50%), radial-gradient(at 0% 100%, hsla(22, 100%, 77%, 0.3) 0px, transparent 50%), radial-gradient(at 80% 100%, hsla(242, 100%, 70%, 0.3) 0px, transparent 50%), radial-gradient(at 0% 0%, hsla(343, 100%, 76%, 0.3) 0px, transparent 50%);

    --zqr-motion: 150ms;
    --zqr-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --zqr-focus-ring: 2px solid var(--zqr-brand);
    --zqr-field-focus: 0 0 0 3px color-mix(in oklch, var(--zqr-brand-end) 30%, transparent);
}

html.zqr-dark {
    --zqr-brand-text: color-mix(in oklch, var(--zqr-brand-end) 45%, white);
    --zqr-brand-soft: color-mix(in oklch, var(--zqr-brand-end) 22%, #0a0f1c);
    --zqr-surface: #111a2b;
    --zqr-surface-muted: #0a0f1c;
    --zqr-text: #f1f5f9;
    --zqr-text-soft: #e2e8f0;
    --zqr-text-muted: #94a3b8;
    --zqr-border: #2a3650;
    --zqr-border-strong: #5b6b85;
    --zqr-notice-success-bg: #133236;
    --zqr-notice-success-border: #17544c;
    --zqr-notice-success-text: #6ee7b7;
    --zqr-notice-error-bg: #30202f;
    --zqr-notice-error-border: #5c2834;
    --zqr-notice-error-text: #fda4af;
    --zqr-shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --zqr-shadow-raised: 0 4px 12px -2px rgb(0 0 0 / 0.4);
    --zqr-shadow-overlay: 0 16px 40px -8px rgb(0 0 0 / 0.5);
    --zqr-focus-ring: 2px solid var(--zqr-brand-text);
}

.zqr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--zqr-control-height);
    padding: var(--zqr-control-padding);
    border: 1px solid transparent;
    border-radius: var(--zqr-radius-control);
    font-family: var(--zqr-font-sans);
    font-size: var(--zqr-text-size);
    line-height: var(--zqr-text-line);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--zqr-motion) var(--zqr-ease), border-color var(--zqr-motion) var(--zqr-ease), color var(--zqr-motion) var(--zqr-ease), box-shadow var(--zqr-motion) var(--zqr-ease);
}

.zqr-btn:disabled,
.zqr-btn[aria-disabled='true'] {
    cursor: not-allowed;
    opacity: 0.6;
}

.zqr-btn:focus-visible,
.zqr-field:focus-visible {
    outline: var(--zqr-focus-ring);
    outline-offset: 2px;
}

.zqr-btn-primary {
    background-image: var(--zqr-brand-gradient);
    color: var(--zqr-on-brand);
}

.zqr-btn-primary:hover:not(:disabled) {
    background-image: var(--zqr-brand-gradient-hover);
}

.zqr-btn-outline {
    background-color: var(--zqr-surface);
    border-color: var(--zqr-border-strong);
    color: var(--zqr-text-soft);
    font-weight: 500;
}

.zqr-btn-outline:hover:not(:disabled) {
    border-color: var(--zqr-brand-border);
    color: var(--zqr-brand-text);
}

.zqr-btn-danger {
    background-color: var(--zqr-danger);
    color: var(--zqr-on-brand);
}

.zqr-btn-danger:hover:not(:disabled) {
    background-color: var(--zqr-danger-strong);
}

.zqr-btn-success {
    background-color: var(--zqr-success);
    color: var(--zqr-on-brand);
}

.zqr-btn-success:hover:not(:disabled) {
    background-color: var(--zqr-success-strong);
}

.zqr-btn-quiet {
    background-color: transparent;
    color: var(--zqr-text-muted);
    font-weight: 500;
}

.zqr-btn-quiet:hover:not(:disabled) {
    background-color: var(--zqr-brand-soft);
    color: var(--zqr-brand-text);
}

.zqr-btn-icon {
    width: var(--zqr-control-height);
    flex: none;
    padding: 0;
}

.zqr-field {
    display: block;
    width: 100%;
    min-height: var(--zqr-control-height);
    padding: var(--zqr-field-padding);
    border: 1px solid var(--zqr-border-strong);
    border-radius: var(--zqr-radius-control);
    background-color: var(--zqr-surface);
    color: var(--zqr-text);
    font-family: var(--zqr-font-sans);
    font-size: var(--zqr-text-size);
    line-height: var(--zqr-text-line);
}

.zqr-field::placeholder {
    color: var(--zqr-text-muted);
}

.zqr-field:focus {
    border-color: var(--zqr-brand);
    box-shadow: var(--zqr-field-focus);
    outline: var(--zqr-focus-ring);
    outline-offset: 1px;
}

.zqr-label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--zqr-text-soft);
    font-size: var(--zqr-text-size);
    font-weight: 500;
}

.zqr-card {
    border: 1px solid var(--zqr-border);
    border-radius: var(--zqr-radius-card);
    background-color: var(--zqr-surface);
    box-shadow: var(--zqr-shadow-card);
}

.zqr-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid;
    border-radius: var(--zqr-radius-control);
    font-size: var(--zqr-text-size);
}

.zqr-notice-success {
    border-color: var(--zqr-notice-success-border);
    background-color: var(--zqr-notice-success-bg);
    color: var(--zqr-notice-success-text);
}

.zqr-notice-error {
    border-color: var(--zqr-notice-error-border);
    background-color: var(--zqr-notice-error-bg);
    color: var(--zqr-notice-error-text);
}

.zqr-text-brand {
    color: var(--zqr-brand-text);
}

.zqr-fill-brand {
    background-image: var(--zqr-brand-gradient);
    color: var(--zqr-on-brand);
}

.zqr-fill-success {
    background-color: var(--zqr-success);
    color: var(--zqr-on-brand);
}

.zqr-fill-tint {
    background-color: var(--zqr-brand-soft);
}
