:root {
    --rose: #B4557A;
    --rose-dark: #9A4364;
    --plum: #7A3B5E;
    --ink: #2A2130;
    --paper: #FBF9FA;
    --white: #FFFFFF;
    --muted: #7A6E76;
    --line: #EEE7EA;
    --radius: 12px;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------------------------------------------------------------- header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rose);
}

/* ------------------------------------------------------------------ main */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

/* ------------------------------------------------------------------ hero */
.hero {
    text-align: center;
    padding-top: 2rem;
}

.hero h1 {
    font-size: clamp(2.25rem, 8vw, 3rem);
    line-height: 1.05;
    margin: 0 0 0.75rem;
    letter-spacing: -0.03em;
}

.tagline {
    font-size: 1.125rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 auto 2.25rem;
    max-width: 30rem;
}

/* ------------------------------------------------------------ scan form */
.scan-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 26rem;
    margin: 0 auto;
    text-align: left;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(42, 33, 48, 0.05);
}

.scan-form label {
    font-weight: 600;
    font-size: 0.9rem;
}

.scan-form input {
    font-size: 1.3rem;
    letter-spacing: 0.06em;
    padding: 0.9rem 1rem;
    border: 2px solid #E4DCE1;
    border-radius: var(--radius);
    background: var(--paper);
    font-family: var(--font-sans);
    color: var(--ink);
    width: 100%;
}

.scan-form input:focus {
    outline: none;
    border-color: var(--plum);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(180, 85, 122, 0.14);
}

.scan-form button {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: var(--radius);
    background: var(--rose);
    color: var(--white);
    cursor: pointer;
    transition: background 0.15s ease;
}

.scan-form button:hover { background: var(--rose-dark); }

.hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 1.5rem;
    text-align: center;
}

/* ------------------------------------------------------------- status dl */
dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

dt { font-weight: 700; color: var(--muted); }
dd { margin: 0; font-weight: 500; }

h1 { letter-spacing: -0.02em; }

a { color: var(--plum); }

/* ---------------------------------------------------------------- footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    background: var(--white);
}

/* ------------------------------------------------- Blazor boilerplate */
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
