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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface-page);
    color: var(--text);
    font: var(--size-sm)/var(--leading-normal) var(--font-body);
}

.header {
    display: flex;
    align-items: center;
    height: var(--header-height);
    padding-inline: var(--space-4);
    background: var(--surface);
    border-bottom: var(--border-width) solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    color: var(--text);
}

.brand-logo {
    width: var(--width-logo);
    max-height: calc(var(--header-height) - var(--space-4));
    height: auto;
    object-fit: contain;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-inline-start: var(--space-4);
    color: var(--text-muted);
    font-size: var(--size-md);
    min-width: 0;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: var(--underline-offset);
}

.breadcrumbs a:hover {
    color: var(--accent-strong);
}

.breadcrumbs [aria-current] {
    color: var(--text);
    font-weight: var(--weight-medium);
}

.breadcrumbs .sep {
    color: var(--border-strong);
}

.header-end {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-inline-start: auto;
}

.button,
.control,
.menu-filter,
.sidebar-filter,
.field-input {
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.brand-name {
    color: var(--brand);
    font-family: var(--font-brand);
    font-weight: bold;
    font-size: 1.25em;
    line-height: 1;
}

.button {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    font-size: var(--size-md);
    font-weight: var(--weight-medium);
    line-height: var(--leading-none);
    text-decoration: none;
    cursor: pointer;
}

.button:hover:not(:disabled) {
    background: var(--surface-sunken);
    border-color: var(--border-strong);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-small {
    min-height: var(--control-height);
    padding: var(--space-1) var(--space-3);
    font-size: var(--size-sm);
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-contrast);
}

.button-primary:hover:not(:disabled) {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
}

.button-brand {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--brand-contrast);
}

.button-brand:hover:not(:disabled) {
    border-color: var(--brand-strong);
    background: var(--brand-strong);
    color: var(--surface);
}

.layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    flex: none;
    width: var(--width-sidebar);
    background: var(--surface);
    border-inline-end: var(--border-width) solid var(--border);
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--space-4);
}

.sidebar-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: none;
    padding: var(--space-2);
    border-block-end: var(--border-width) solid var(--border);
}

.sidebar-filter {
    flex: 1;
    min-width: 0;
    padding: var(--space-2) var(--space-3);
    font-size: var(--size-sm);
}

.sidebar-toggle {
    display: inline-flex;
    padding: var(--space-1);
    border: 0;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
}

.sidebar-toggle:hover {
    color: var(--accent-strong);
}

.sidebar-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.sidebar-toggle-when-expanded {
    display: inline-flex;
    transform: rotate(90deg);
}

.sidebar-toggle-when-collapsed {
    display: none;
    transform: rotate(-90deg);
}

:root[data-sidebar="collapsed"] .sidebar {
    width: auto;
}

:root[data-sidebar="collapsed"] .sidebar-nav {
    display: none;
}

:root[data-sidebar="collapsed"] .sidebar-filter {
    display: none;
}

:root[data-sidebar="collapsed"] .sidebar-toggle-when-expanded {
    display: none;
}

:root[data-sidebar="collapsed"] .sidebar-toggle-when-collapsed {
    display: inline-flex;
}

.sidebar-section {
    margin-block-end: var(--space-6);
}

.sidebar-heading {
    margin: 0 0 var(--space-2);
    font-size: var(--size-sm);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--text-muted);
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-link {
    display: block;
    padding: var(--space-2);
    border-radius: var(--radius);
    color: var(--accent);
    font-size: var(--size-sm);
    text-decoration: underline;
    text-underline-offset: var(--underline-offset);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    background: var(--surface-sunken);
}

.sidebar-link[aria-current] {
    background: var(--accent);
    color: var(--accent-contrast);
    text-decoration: none;
}

.sidebar-empty {
    color: var(--text-muted);
    padding: var(--space-2);
}

.header-menu {
    display: none;
}

:root[data-nav="header"] .sidebar {
    display: none;
}

:root[data-nav="header"] .header-menu {
    display: inline-flex;
}

@media (max-width: 56rem) {
    .sidebar {
        display: none;
    }

    .header-menu {
        display: inline-flex;
    }
}

.main {
    flex: 1;
    padding: var(--space-4);
}

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.footer {
    position: relative;
    background: var(--surface);
    border-top: var(--border-width) solid var(--border);
    padding: var(--space-3) var(--space-4);
}

.footer-top {
    display: flex;
    align-items: flex-start;
    margin: 0 auto;
}

.footer-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.footer-links {
    display: none;
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
}

.footer-toggle:checked ~ .footer-top .footer-links {
    display: flex;
}

.footer-toggle:checked ~ .footer-divider {
    display: block;
}

.footer-toggle:checked ~ .footer-bottom .footer-legal {
    display: block;
}

.footer-toggle:checked ~ .footer-toggle-button .footer-toggle-icon {
    transform: rotate(0deg);
}

.footer-toggle-when-expanded {
    display: none;
}

.footer-toggle-when-collapsed {
    display: inline-flex;
}

.footer-toggle:checked ~ .footer-toggle-button .footer-toggle-when-expanded {
    display: inline-flex;
}

.footer-toggle:checked ~ .footer-toggle-button .footer-toggle-when-collapsed {
    display: none;
}

.footer-logo-full {
    display: none;
}

.footer-logo-compact {
    height: 2rem;
}

.footer-toggle:checked ~ .footer-top .footer-logo-full {
    display: block;
}

.footer-toggle:checked ~ .footer-top .footer-logo-compact {
    display: none;
}

@media (max-width: 40rem) {
    .footer-top {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-6);
    }
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 1.75rem;
}

.footer-row-head {
    min-height: 2rem;
}

.footer-toggle:checked ~ .footer-top .footer-row-head {
    min-height: 3.5rem;
}

.footer-heading {
    margin: 0;
    font-size: var(--size-md);
    font-weight: var(--weight-medium);
    color: var(--text);
}

.footer-heading a {
    color: inherit;
    text-decoration: none;
}

.footer-heading a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: var(--underline-offset);
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    color: var(--text);
}

.footer-logo {
    width: auto;
    max-width: 100%;
    height: 1.75rem;
}

.footer-logo-likeajob {
    height: 3.5rem;
}

.footer-row a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--text-muted);
    font-size: var(--size-sm);
    text-decoration: none;
}

.footer-row a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: var(--underline-offset);
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--text-muted);
    font-size: var(--size-sm);
}

.footer-label {
    font-weight: var(--weight-medium);
}

.footer-contact > .footer-icon,
.footer-row > a > .footer-icon {
    margin-inline-end: var(--space-1);
}

.footer-icon {
    width: 1em;
    height: 1em;
    flex: none;
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.footer-social a {
    display: inline-flex;
    color: var(--text-muted);
}

.footer-social a:hover {
    color: var(--accent-strong);
}

.footer-social .footer-icon {
    width: 1.25em;
    height: 1.25em;
}

.footer-divider {
    display: none;
    width: min(40rem, 80%);
    margin: var(--space-4) auto;
    border: none;
    border-top: var(--border-width) solid var(--border-subtle);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--size-sm);
}

.footer-toggle:checked ~ .footer-bottom {
    margin-top: var(--space-3);
}

.footer-legal {
    display: none;
}

.footer-legal p {
    margin: 0;
}

.footer-toggle-button {
    position: absolute;
    top: var(--space-3);
    right: var(--space-4);
    display: inline-flex;
    padding: var(--space-1);
    color: var(--text-muted);
    cursor: pointer;
}

.footer-toggle-button:hover {
    color: var(--accent-strong);
}

.footer-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: min(60%, calc(100% - var(--space-8)));
    margin: var(--space-4) auto 0;
}

.message {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0;
    padding: var(--space-3) var(--space-4);
    border: var(--border-width) solid;
    border-radius: var(--radius);
    font-size: var(--size-md);
}

.message-icon {
    flex: none;
    width: var(--size-md);
    height: var(--size-md);
}

.message-text {
    flex: 1;
}

.message-dismiss {
    flex: none;
    display: inline-flex;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
}

.message-dismiss:hover {
    opacity: 1;
}

.message-dismiss-icon {
    width: var(--size-md);
    height: var(--size-md);
}

.message-error {
    border-color: color-mix(in oklch, var(--negative) 35%, transparent);
    background: var(--negative-soft);
    color: var(--negative-strong);
}

.message-success {
    border-color: color-mix(in oklch, var(--positive) 35%, transparent);
    background: var(--positive-soft);
    color: var(--positive-strong);
}

.message-info {
    border-color: color-mix(in oklch, var(--info) 35%, transparent);
    background: var(--info-soft);
    color: var(--info-strong);
}

.loading {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--scrim);
}

.loading[hidden] {
    display: none;
}

.loading-spinner {
    width: var(--space-8);
    height: var(--space-8);
    border: 3px solid var(--surface-raised);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: loading-spin 0.7s linear infinite;
}

@keyframes loading-spin {
    to {
        transform: rotate(1turn);
    }
}

.prefs {
    position: relative;
}
.prefs-icon {
    width: var(--size-md);
    height: var(--size-md);
    display: block;
}

.popover {
    font-size: var(--size-sm);
    position: absolute;
    inset: auto;
    margin: 0;
    min-width: var(--width-popover);
    padding: 0;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.popover:popover-open {
    position: fixed;
    inset-block-start: calc(var(--header-height) + var(--space-1));
    inset-inline-end: var(--space-4);
    inset-inline-start: auto;
}

.popover-head {
    margin: 0;
    padding: var(--space-3) var(--space-4);
    border-bottom: var(--border-width) solid var(--border);
    font-weight: var(--weight-medium);
}

.popover-head-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.popover-head strong {
    font-weight: var(--weight-medium);
}

.popover-head span {
    color: var(--text-muted);
    font-size: var(--size-sm);
    overflow: hidden;
    text-overflow: ellipsis;
}

.popover ul {
    list-style: none;
    margin: 0;
    padding: var(--space-2);
}

.popover ul a {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: var(--underline-offset);
}

.popover ul a:hover,
.menu-section a:hover,
.menu-section a:focus-visible,
.colmenu-item:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.popover-foot {
    padding: var(--space-2) var(--space-4) var(--space-4);
}

.popover-foot .button {
    width: 100%;
    justify-content: center;
}

.user {
    position: relative;
}

.user-button {
    gap: var(--space-2);
}

.user-name {
    max-width: var(--width-username);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popover-prefs {
    display: none;
    min-width: var(--width-prefs);
    overflow: visible;
}

.popover-prefs:popover-open {
    display: block;
}

.prefs-body {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--space-3) var(--space-4);
    padding: var(--space-4);
}

.prefs-label {
    color: var(--text-muted);
    font-size: var(--size-sm);
}

.prefs-row {
    display: contents;
}

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: var(--border-width);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    background: var(--border);
    overflow: hidden;
}

.segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    width: 100%;
    padding: var(--space-2);
    border: 0;
    background: var(--surface);
    color: inherit;
    font: inherit;
    font-size: var(--size-sm);
    line-height: var(--leading-none);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.segment:hover:not(:disabled) {
    background: var(--surface-sunken);
}

.segment:disabled {
    color: var(--border-strong);
    cursor: default;
}

.segment[aria-pressed="true"],
.segment[aria-current="true"],
.listbox-option[aria-current="true"] {
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: var(--weight-medium);
}

.flag {
    width: 1.4em;
    height: auto;
    flex: none;
    border-radius: var(--radius-sm);
}

.listbox {
    position: relative;
}

.listbox-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: inherit;
    font: inherit;
    font-size: var(--size-sm);
    line-height: var(--leading-none);
    cursor: pointer;
    list-style: none;
}

.listbox-toggle::-webkit-details-marker {
    display: none;
}

.listbox-toggle:hover {
    background: var(--surface-sunken);
}

.listbox-current {
    flex: 1;
    text-align: start;
}

.caret {
    width: var(--size-sm);
    height: var(--size-sm);
    color: var(--text-muted);
}

.listbox-menu {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + var(--space-1));
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--border-width);
    min-width: 0;
    padding: var(--space-1);
}

.listbox-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: inherit;
    font: inherit;
    font-size: var(--size-sm);
    line-height: var(--leading-none);
    text-align: start;
    cursor: pointer;
}

.listbox-option:hover {
    background: var(--surface-sunken);
}


.menu {
    font-size: var(--size-sm);
    width: min(var(--width-menu), 94vw);
    height: min(var(--height-menu), 86vh);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.menu[open] {
    display: flex;
    flex-direction: column;
}

.menu::backdrop {
    background: var(--scrim);
}

.menu-head {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-shrink: 0;
    padding: var(--space-4);
    background: var(--surface);
    border-bottom: var(--border-width) solid var(--border);
}

.menu-title {
    margin: 0;
    font-size: var(--size-md);
    font-weight: var(--weight-medium);
    white-space: nowrap;
}

.menu-filter {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    font-size: var(--size-sm);
}

.menu-body {
    padding: var(--space-4);
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
}

.menu-columns {
    columns: var(--width-menu-column) auto;
    column-gap: var(--space-4);
}

.menu-section {
    break-inside: avoid;
    margin-block-end: var(--space-6);
}

.menu-section h2 {
    margin: 0 0 var(--space-2);
    font-size: var(--size-sm);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--text-muted);
}

.menu-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-section a {
    display: block;
    padding: var(--space-2) var(--space-2);
    border-radius: var(--radius);
    color: var(--accent);
    font-size: var(--size-sm);
    text-decoration: underline;
    text-underline-offset: var(--underline-offset);
    overflow-wrap: break-word;
}

.menu-section a[aria-current] {
    background: var(--accent);
    color: var(--accent-contrast);
}

.menu-empty {
    color: var(--text-muted);
    padding: var(--space-4);
}
