/* Page shell: container, header bar and back link. */

.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 56px;
    flex: 1;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.wordmark__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--primary);
    color: var(--primary-fg);
}

.site-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.language-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
}

.language-picker .icon--globe {
    position: absolute;
    inset-inline-start: 10px;
    pointer-events: none;
}

.language-picker select {
    appearance: none;
    height: 32px;
    padding-inline: 32px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    field-sizing: content;
    cursor: pointer;
    transition: background var(--ease), color var(--ease);
}

.language-picker:hover {
    color: var(--text-primary);
}

.language-picker select:hover {
    background: var(--bg-hover);
}

/* Theme toggle shows the icon of the theme it switches to */
.theme-toggle .icon--sun,
html[data-theme="dark"] .theme-toggle .icon--moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle .icon--sun {
    display: inline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-bottom: -32px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: color var(--ease);
}

.back-link:hover {
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .container {
        padding: 12px 16px 32px;
        gap: 40px;
    }
}

@media (pointer: coarse) {
    .language-picker select {
        min-height: 44px;
    }

    .back-link {
        min-height: 44px;
    }
}
