.auth-brand,
.context-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: var(--space-5);
}

.auth-brand img,
.context-brand img {
    width: min(220px, 64vw);
    height: auto;
    display: block;
}

.auth-back-link,
.context-back-link,
.topbar__context-switch {
    color: var(--text-secondary);
    text-decoration: none;
}

.auth-back-link,
.context-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: var(--space-4);
    font-size: 0.9rem;
    font-weight: 650;
}

.auth-back-link:hover,
.context-back-link:hover,
.topbar__context-switch:hover {
    color: var(--text-primary);
}

.auth-entry-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-entry-links a {
    color: var(--brand-red);
    font-weight: 750;
    text-decoration: none;
}

.auth-entry-links a:hover {
    color: var(--brand-red-hover);
}

.context-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--space-5);
    background:
        radial-gradient(circle at 20% 0%, rgba(214, 40, 50, 0.08), transparent 32rem),
        var(--background-base);
}

.context-panel {
    width: min(100%, 760px);
    padding: clamp(24px, 5vw, 40px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-panel);
    background: var(--surface-2);
}

.context-panel__header {
    max-width: 620px;
    margin-bottom: var(--space-5);
}

.context-panel__header > p:last-child {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.context-list {
    display: grid;
    gap: var(--space-3);
}

.context-option {
    width: 100%;
    min-height: 104px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-panel);
    background: var(--surface-1);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.context-option:hover {
    border-color: color-mix(in srgb, var(--brand-red) 55%, var(--border-subtle));
    background: var(--surface-3);
}

.context-option__content {
    min-width: 0;
}

.context-option__type {
    display: block;
    margin-bottom: var(--space-1);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.context-option__name {
    display: block;
    margin-bottom: var(--space-1);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.25;
}

.context-option__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.context-option__meta span + span::before {
    content: "·";
    margin-right: var(--space-3);
    color: var(--text-muted);
}

.context-option__action {
    color: var(--brand-red);
    font-weight: 800;
    white-space: nowrap;
}

.context-panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.context-panel__footer form {
    margin: 0;
}

.context-empty {
    padding: var(--space-5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-panel);
    background: var(--surface-1);
}

.context-empty h2 {
    margin-bottom: var(--space-2);
}

.context-empty p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.topbar__identity {
    min-width: 0;
}

.topbar__context {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.topbar__context-switch {
    font-size: 0.78rem;
    font-weight: 700;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

@media (max-width: 767px) {
    .context-page {
        padding: var(--space-4);
    }

    .context-option {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: var(--space-4);
    }

    .context-option__action {
        justify-self: start;
    }

    .context-panel__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .context-panel__footer .button,
    .context-panel__footer form {
        width: 100%;
    }

    .topbar__actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    .context-option {
        transition: none;
    }
}
