:root {
    color-scheme: dark light;

    --primary: #cc2027;
    --primary-darken: #8E161B;
    --primary-lighten: #D64C52;
    --primary-text-contrast: #FFF;

    --secondary: #20ccc5;
    --secondary-darken: #168E89;
    --secondary-lighten: #4CD6D0;
    --secondary-text-contrast: #000;

    --error: #c43933;
    --error-darken: #892723;
    --error-lighten: #CF605B;
    --error-text-contrast: #FFF;

    --info: #206ccc;
    --info-darken: #164B8E;
    --info-lighten: #4C89D6;
    --info-text-contrast: #FFF;

    --success: #7dcc20;
    --success-darken: #578E16;
    --success-lighten: #97D64C;
    --success-text-contrast: #000;

    --warning: #cc5e20;
    --warning-darken: #8E4116;
    --warning-lighten: #D67E4C;
    --warning-text-contrast: #FFF;

    --divider: light-dark(#B2AFAF, #454343);

    --background-color: light-dark(#fffbfb, #171414);
    --background-color-darken: light-dark(#B2AFAF, #100E0E);
    --background-color-lighten: light-dark(#FFFBFB, #454343);

    --background-secondary-color: #ebebeb;

    --light-background-color: #fffbfb;
    --dark-background-color: #171414;

    --header-background-color: light-dark(#171414, #fffbfb);
    --header-background-color-darken: light-dark(#100E0E, #B2AFAF);
    --header-background-color-lighten: light-dark(#454343, #FFFBFB);

    --header-text-color: light-dark(#fffbfb, #171414);
    --header-text-color-secondary: #ffffffb3;
    --header-text-color-disable: var(--divider);

    --text-color: light-dark(#171414, #fffbfb);
    --text-color-secondary: #ffffffb3;
    --text-color-disable: light-dark(#454343, #B2AFAF);

    --light-text-color: #171414;
    --dark-text-color: #fffbfb;

    --text-color-inverse: light-dark(#fffbfb, #171414);
    --text-color-secondary-inverse: #ffffffb3;
    --text-color-disable-inverse: var(--divider);

    --box-shadow-light: .4rem .4rem 0px .1rem #B2AFAF;
    --box-shadow-dark: .4rem .4rem 0px .1rem #454343;
    --box-shadow-auto: .4rem .4rem 0px .1rem var(--divider);

    --h1-color: var(--primary);
    --h2-color: #c33d35;
    --h3-color: #b94f44;
    --h4-color: #ae5e52;
    --h5-color: #a16a61;
    --h6-color: #927671;

    --font-size: 1.2em;
    --default-space: .2em;
}

[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
}

[data-theme="dark"] {
    --background-color: #171414;
    --text-color: #fffbfb;
    --text-color-inverse: #171414;
}

[data-theme="light"] {
    --background-color: #fffbfb;
    --text-color: #171414;
    --text-color-inverse: #fffbfb;
}

* {
    box-sizing: border-box;
}

:root {
    --main-color: var(--primary);
    --dark-main-color: var(--primary-darken);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);

    width: 80vw;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    text-rendering: optimizeSpeed;
}

a {
    transition: .2s linear, border .2s linear;
}

h1 {
    font-size: calc(var(--font-size) * 1.6);
}

.shaarli-menu {
    background-color: var(--primary);
}

.tag-sort a.button {
    border: 2px solid var(--text-color);
    border-radius: 5px;
    padding: 3px 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    background-color: transparent;
}

.subheader-form {
    padding: calc(var(--default-space)*6) 0;
    width: 80vw;
    border: var(--default-space) solid var(--text-color);
}

.subheader-form {
    height: auto;
}

.subheader-form a.button,
.tag-sort a.button {
    border-color: var(--text-color);
    color: var(--text-color);
}

.subheader-form a.button:hover,
.tag-sort a.button:hover {
    border-color: var(--text-color-inverse);
    color: var(--text-color-inverse);
}

.linklist-pages a,
.daily-entry .daily-entry-title a {
    color: var(--primary);
}

.linklist-pages a:hover,
.daily-entry .daily-entry-title a {
    color: var(--primary-darken);
}

.linkcount {
    color: var(--text-color);
}

#link-count-content {
    background-color: var(--background-color-lighten);
}

.linklist-filters {
    padding-left: .3em;
    margin: unset;
    color: var(--primary);
    font-size: unset;
}

.linklist-filters a:hover {
    color: var(--text-color);
    background: var(--primary);
}

.linksperpage {
    color: var(--text-color)
}

.linksperpage a {
    width: auto;
}

.linksperpage a:hover {
    color: var(--text-color);
    background: var(--primary);
}

.linksperpage input[type="text"] {
    margin: 0;
    padding: .348em;
    height: auto;
    font-size: 1em;
    width: 4em;
    color: var(--secondary-text-contrast);
}

.linklist-item.private::before {
    background: var(--warning);
}

.linklist-item-title {
    background: var(--header-background-color);
}

.linklist-item-description {
    color: var(--text-color-inverse);
}

.linklist-item-description a:hover,
.daily-entry-title a:hover,
.page-form a:hover {
    color: var(--primary-darken);
}

.linklist-item-title .linklist-link:hover {
    color: var(--primary-darken);
}

.edit-link {
    color: var(--secondary-darken);
}

.edit-link:hover {
    color: var(--secondary);
}

.linklist-item-infos {
    padding: 8px 8px 5px 8px;
    grid-area: footer;
    background: var(--background-secondary-color);
}

.linklist-item-title .label-private {
    border: solid 1px var(--warning);
    color: var(--warning-darken);
}

.linklist-item-infos .label a {
    border-radius: .3rem;
    background-color: var(--header-background-color-darken);
    border: 1px solid var(--header-background-color-darken);
    padding: .3em .6em;
}

.linklist-item-infos .label a:hover {
    color: var(--primary);
    background-color: var(--header-background-color-lighten);
    border: 1px solid var(--header-background-color-darken);
}

.linklist-item-infos .linklist-item-tags {
    margin-bottom: .6em;
}

.footer-container::before {
    display: none;
    margin: 0;
    background: inherit;
}

.footer-container {
    margin: 0;
    color: var(--text-color);
    margin: calc(var(--default-space) *4) 0 0 0;
}

.footer-container a {
    color: var(--primary);
}

.footer-container a:hover {
    color: var(--primary-darken);
}

.linklist-item-title {
    grid-area: header;
}

.linklist-item-thumbnail {
    grid-area: thumb;
}

.linklist-item-description {
    grid-area: main;
}

.grid-container,
.linklist-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        'thumb header header'
        'thumb main main'
        'footer footer footer';
    gap: 10px;
    width: 80vw;
    padding: 10px;
}

.page-form select,
input[type="text"],
input[type="checkbox"] {
    color: var(--text-color);
    background-color: var(--primary-lighten) !important;
}

.page-form code,
.pure-alert code,
.markdown :not(pre) code {
    color: var(--text-color);
    background-color: var(--background-color-lighten);
}

.cloudtag-container a {
    color: var(--primary);
}

.cloudtag-container a:hover {
    color: var(--primary-darken);
}

button {
    color: var(--text-color);
    background-color: var(--primary);
    border: 0;
    border-radius: 2px;
    background-color: var(--main-color);
    padding: 5.5px 7.2px;
}

button:hover {
    color: var(--text-color-inverse);
}

.page-form textarea,
.page-form input[type="password"],
.page-form input[type="text"] {
    border: medium none currentColor;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .078), 0 1px 1px rgba(0, 0, 0, .298) inset;
    padding: 0 5px;
    height: 30px;
}

.searchform-block input[type="text"] {
    border: medium none currentColor;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .078), 0 1px 1px rgba(0, 0, 0, .298) inset;
    padding: 0 5px;
    height: 30px;
}

.picwall-container {
    display: flex;
    flex-wrap: wrap;
    gap: .1rem;
    justify-content: center;
}

.picwall-pictureframe:hover span.info {
    background-color: rgba(0, 0, 0, .6);
    color: var(--text-color);
    width: 100%;
    height: 100%;
    padding: .1em;
}

.awesomplete>ul {
    color: var(--text-color-inverse);
    background: var(--primary-lighten);
}

.awesomplete mark {
    background-color: var(--success);
    font-weight: bold;
}

.awesomplete>ul>li[aria-selected="true"],
.awesomplete>ul>li:hover {
    background: var(--primary-darken);
    color: var(--primary-text-contrast);
}

.tag-sort {
    margin-top: 1em;
}

.page-form {
    margin: 0;
}

.container {
    margin-top: 0;
}

.header-search,
.search-linklist {
    padding: 0 0 10px 0;
}

.pinned-link {
    color: var(--error) !important;
}

.head-logo {
    vertical-align: middle;
    display: inline;
}

.pure-menu-link {
    display: inline-block;
}



header {
    background-color: transparent;
}

header h1 img {
    display: inline;
}

header h1 {
    color: var(--primary);
}

header svg {
    fill: var(--primary-lighten);
    vertical-align: middle;
}

header a {
    transition: 0.4s;
}

header h1 a {
    text-decoration: none;
    color: var(--primary);
    text-decoration: underline transparent;
}

header a:hover {
    color: var(--primary-lighten);
    text-decoration: underline var(--primary);
    text-decoration-thickness: var(--default-space);
}

nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    font-family: initial;
}

nav h1,
nav ul {
    margin: 0;
}

nav h1 img {
    vertical-align: middle;
}

nav ul {
    display: flex;
    gap: calc(var(--default-space) * 2);
    flex-wrap: wrap;
    padding: 0;
}

nav li {
    margin: var(--default-space);
    list-style: none;
    font-size: calc(var(--font-size) * 1.2);
}

nav li a {
    color: var(--primary-lighten);
    text-decoration: underline transparent;
}

nav li a:hover,
nav .active {
    text-decoration: underline var(--primary-darken);
    text-decoration-thickness: var(--default-space);
}

nav .fa {
    padding-right: var(--default-space);
}


.searchform-block input[type="text"]::placeholder,
.page-form input[type="text"]::placeholder {
    color: var(--text-color);
}

.searchform-block input[type="text"],
.page-form input[type="text"] {
    color: var(--secondary-text-contrast);
}

.paging,
.linklist-item,
.page-visitor,
#pageError,
.login-form-container,
#addlink-form,
.page-form {
    background-color: var(--light-background-color);
    border: 1px solid var(--background-color-darken);
    border-radius: calc(var(--default-space) * 1.2);
    box-shadow: var(--box-shadow-light);
}

.paging {
    color: var(--primary-lighten);
    margin: 0 0 calc(var(--default-space) *4) 0;
}

section .pure-g,
.pluginform-container {
    margin: 0 0 calc(var(--default-space) *4) 0;
}

.linklist-item-infos-dateblock a {
    color: var(--primary);
}

.linklist-item-infos-dateblock a:hover {
    text-decoration: underline var(--primary-darken);
    color: var(--primary-darken);
}

.pinned-link,
.linklist-item-title .label-sticky {
    color: var(--info-darken) !important;
}

.linklist-item-title .label-sticky {
    border: solid 1px var(--info-darken);
}