:root {
	--blue-dark: #C5D2DA;
	--blue-light: #EEF3F6;
	--yellow-dark: #f3e256;
	--yellow-light: #fef4ac;
    --white:        #fff;
    --black:        #000;
    --surface-dark: #14171a;
    --surface-mid:  #3a4046;
    --gray-soft:    #eeeeee;
    --gray-line-soft: #ccc;
    --steel:        #979da9;
    --steel-dark:   #737983;
    --gray-text:    #666;
    --accent-blue:   #4a6b8a;
    --accent-orange: #ff6a3d;
    --brand-pink:    #a51243;
    --red:          #f44336;
    --orange:       #f5b301;
    --pink-soft:    #ffb7b2;
    --name-pink:        pink;
    --name-blue:        blue;
    --name-lavender:    lavender;
    --trans-a00: transparent;
    --c-0099ff                      : #0099ff;
    --c-129094                      : #129094;
    --c-2c46c8                      : #2c46c8;
    --c-5a7b9a                      : #5a7b9a;
    --c-6666ff                      : #6666ff;
    --c-b5ead7                      : #b5ead7;
    --c-c7ceea                      : #c7ceea;
    --c-e0bbff                      : #e0bbff;
    --c-ff3399                      : #ff3399;
    --c-ffe7ee                      : #ffe7ee;
    --rgb-14-41-84                  : rgb(14,41,84);
    --rgb-15-112-168                : rgb(15,112,168);
    --rgb-43-10-38                  : rgb(43,10,38);
    --trans-a10: rgba(255, 255, 255, 0.14);
    --trans-a25: rgba(255, 255, 255, 0.28);
    --trans-a20:    rgba(0, 0, 0, 0.25);
    --trans-a30                : rgba(0,0,0,0.35);
    --trans-a40: rgba(0, 0, 0, 0.45);
    --trans-a50                : rgba(0,0,0,0.55);
    --trans-a60                : rgba(0,0,0,0.6);
    --trans-a70                : rgba(0,0,0,0.7);
    --trans-a90          : rgba(255,255,255,0.92);

    --icon-online: #49e85f;

    /* Shell-bredder — fluid med klassiske desktop caps */
    --content:        clamp(20rem, 92vw, 58.125rem);
    --content-inner:  clamp(18rem, 84vw, 48.125rem);

    /* Spacing-skala (rem) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    /* Border-radii */
    --radius-sm: 0.25rem;
    --radius:    0.5rem;
    --radius-lg: 1.5em;          /* matcher det runde toprow-look */

    /* Fluid type-skala — clamp(min, preferred, max). */
    --fs-xxs:  clamp(0.58rem, 0.55rem + 0.10vw, 0.66rem);
    --fs-xs:   clamp(0.70rem, 0.65rem + 0.15vw, 0.80rem);
    --fs-sm:   clamp(0.80rem, 0.75rem + 0.20vw, 0.90rem);

    --fs-body: 0.667rem;
    --fs-lead: clamp(1.10rem, 1.02rem + 0.40vw, 1.30rem);

    --fs-h1:   clamp(1.00rem, 0.95rem + 0.20vw, 1.15rem);
    --fs-h2:   clamp(0.94rem, 0.90rem + 0.16vw, 1.06rem);
    --fs-h3:   clamp(0.86rem, 0.84rem + 0.10vw, 0.95rem);
    --fs-h7:   clamp(1.25rem, 1.08rem + 0.85vw, 1.625rem);

    /* Semantic design tokens — shared by the base layer and then
       overridden by page-specific sections. */
    --surface-page: var(--white);
    --surface-panel: var(--blue-light);
    --surface-panel-strong: var(--blue-dark);
    --surface-header: var(--blue-dark);
    --surface-header-text: var(--gray-text);
    --surface-card: var(--white);
    --surface-border: var(--blue-dark);
    --surface-border-strong: var(--black);
    --surface-shadow: var(--trans-a20);
    --radius-panel: 0.19rem;
    --radius-card: 0.5rem;
    --radius-popover: 0.75rem;
    --space-section-mobile: var(--space-4);
    --space-section-desktop: 3em;

}


html ,body {
    height: 100dvh;
    overflow: hidden;
}

body {
	margin: 0;
    background: linear-gradient(168deg,var(--rgb-43-10-38) 0%, var(--rgb-14-41-84) 50%, var(--rgb-43-10-38) 100%);
    background-attachment: fixed;
    overflow-y: scroll;
}

/* Typografi */
html {
    font-size: 100%;
}

body, button {
    font-size: var(--fs-body);
    font-family: Verdana, sans-serif;
}

button {
    font-size: inherit;
}

h1 {
    font-size: var(--fs-h1);
    line-height: 1.15;
}

h2 {
    font-size: var(--fs-h2);
    line-height: 1.2;
}

h3 {
    font-size: var(--fs-h3);
    line-height: 1.25;
}

h7 {
    font-size: var(--fs-h7);
    font-weight: bold;
    color: var(--white);
}

a {
	color: var(--black);

    &:not([href]) {
        cursor: pointer;
    }
}

img, video {
    max-width: 100%;
    height: auto;
}

ol li {
	margin: 0.31rem;
}










/*
    Generelt design og layout
*/
body > div {
    display: flex;
    justify-content: center;

    & #boyfriend {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;

        body.is_browser & {
            width: var(--content);
            display: block;
            flex: initial;
            min-height: initial;
        }

    }

    & #team_container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-top: 1.5em;

        /* TODO: skjult midlertidigt på mobil — "tager over" content-pane'en
           ved refresh på en profil. Skal integreres ordentligt i
           three-pane layout senere.
           Se /memories/repo/mobile-team-sidepanel-todo.md. */
        display: none;

        & #team_menu,
        & #team {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        body.is_browser & {
            display: block;
            width: var(--content-inner);
            margin-left: 1.5em;

            & #team_menu,
            & #team {
                width: var(--content-inner);
            }
        }
    }

    & #toprowcontainer {
        width: 100%;
        position: relative;
        flex-shrink: 0;

        & .toprow {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: var(--space-2);
            padding: 0 1em 0.4em;
            position: relative;

            body.is-browser & {
                padding: 1.5em 1em 0.4em;
            }

            & #logo {
                cursor: pointer;
                position: static;
                width: 50vw;
            }

            & #newsticker, & #menu, & #topmenu_right {
                display: none;
            }

            & #bf-dev-reload {
                display: block;
                width: 2.25rem;
                height: 2.25rem;
                border: 0;
                background: var(--trans-a00);
                color: var(--white);
                font-size: 1.375rem;
                line-height: 1;
                cursor: pointer;
                z-index: 10;
            }

            & #bf-topbar-counters {
                display: flex;
                gap: var(--space-2);
                margin-left: auto;

                & a {
                    display: inline-flex;
                    align-items: center;
                    gap: var(--space-1);
                    padding: 0.19rem 0.44rem;
                    color: var(--white);
                    text-decoration: none;
                    background: var(--trans-a10);
                    border-radius: 999px;
                }

                & .bf-tc-pill {
                    display: inline-block;
                    min-width: 1.2em;
                    padding: 0 0.45em;
                    background: var(--accent-orange);
                    color: var(--white);
                    border-radius: 999px;
                    font-size: var(--fs-sm);
                    font-weight: bold;
                    text-align: center;
                    line-height: 1.5;
                }

                & a.bf-tc-iconly {
                    position: relative;
                    padding: 0.25rem 0.38rem;
                    gap: 0;

                    & .bf-tc-icon {
                        display: inline-flex;
                        align-items: center;
                        justify-content: center;
                        line-height: 0;

                        & svg {
                            width: 1.38rem;
                            height: 1.38rem;
                            display: block;
                        }
                    }

                    & .bf-tc-pill {
                        position: absolute;
                        top: -0.25rem;
                        right: -0.5rem;
                        min-width: 1.2em;
                        padding: 0.05em 0.35em;
                        font-size: var(--fs-xs);
                        line-height: 1.3;
                        box-shadow: 0 0 0 1px var(--white);
                    }
                }
            }
        }

        @media (min-width: 64em) {
            width: var(--content);

            & .toprow {
                display: block;
                height: 5.56rem;
                width: var(--content);
                padding: 0 ! important;
                background-image: linear-gradient(to bottom, var(--steel), var(--steel-dark) 62%, var(--gray-text) 62% 66%, var(--blue-dark) 66%, var(--blue-dark));
                border-bottom-left-radius: var(--radius-lg);
                border-bottom-right-radius: var(--radius-lg);

                & #logo {
                    position: relative;
                    top: 0.94rem;
                    left: 1.75rem;
                    width: auto;
                }

                & #newsticker {
                    display: block;
                    position: absolute;
                    top: 0.31rem;
                    left: 43.75rem;
                    width: 10.06rem;
                    height: 2.94rem;
                    border-left: 1px solid var(--trans-a10);
                    border-right: 1px solid var(--trans-a10);
                    background:
                        radial-gradient(ellipse at left center, var(--trans-a10) 0%, var(--trans-a00) 50%),
                        radial-gradient(ellipse at right center, var(--trans-a10) 0%, var(--trans-a00) 50%);

                    & #ticker {
                        font-size: var(--fs-xxs);
                        color: var(--gray-soft);
                        padding: 0.12rem;
                        z-index: 2;
                        position: absolute;
                        top: 0;
                        left: 0.19rem;
                        width: 9.38rem;
                        height: 2.56rem;
                        overflow: hidden;

                        & .date,
                        & .title {
                            text-decoration: none;
                            color: var(--gray-soft);
                        }

                        & .title {
                            font-weight: bold;
                        }
                    }

                    & #link {
                        position: absolute;
                        right: 0.31rem;
                        top: 2.19rem;
                        z-index: 10;

                        & a {
                            font-size: var(--fs-xxs);
                            color: var(--gray-soft);
                            text-decoration: none;
                        }
                    }
                }

                /* Mobil-only widgets skjules på desktop. */
                & #bf-topbar-counters,
                & #bf-dev-reload {
                    display: none;
                }
            }

            & #menu {
                display: block;

                & a { text-decoration: none; }

                & #menu_default   { display: block; }
                & #menu_logged_in { display: none; }

                & ul {
                    position: absolute;
                    z-index: 8000;
                    top: 3.44rem;
                    left: 0;
                    margin: 0;
                    padding: 0 0 0 0.62rem;
                    list-style: none;

                    & li {
                        list-style-type: none;
                        float: left;
                        position: relative;
                        text-decoration: none;
                        padding: 0.75rem 0 1.25rem 0;
                        height: 0.62rem;

                        &:hover {
                            background-image: linear-gradient(to top, var(--trans-a00) 2.375rem, var(--white) 2.375rem);
                        }

                        &:hover ul {
                            display: block;
                        }

                        & a { padding: 0.62rem 1rem; }

                        & ul {
                            position: absolute;
                            display: none;
                            top: 1.38rem;
                            left: 0;

                            & li {
                                list-style-type: none;
                                float: none;
                                overflow: hidden;
                                width: 7.5rem;
                                height: 1.12rem;
                                padding: 0.5rem 0.19rem 0.19rem 0;
                                margin: 0;
                                border-width: 0 0.19rem 0.19rem 0.19rem;
                                border-style: solid;
                                border-color: var(--white);
                                background-color: var(--blue-light);
                                left: -0.62rem;
                                top: 0.75rem;
                                position: relative;
                                white-space: nowrap;

                                & a { padding: 0.5rem 6.25rem 0.5rem 1.06rem; }

                                :hover:first-child {
                                    background-color: var(--blue-dark);
                                }

                                & input {
                                    background-color: var(--white) !important;
                                }
                            }
                        }

                        & .search {
                            height: 3.75rem;
                            border: 0.12rem solid var(--white);
                            width: 10.94rem;
                            padding: 0;
                            margin: 0;
                            overflow: visible;

                            & > div {
                                padding: 1em;

                                & .box {
                                    display: flex;

                                    & > div:nth-child(1) input {
                                        border: 1px solid var(--steel-dark);
                                        width: 7.19rem;
                                    }

                                    & > div:nth-child(2) {
                                        border: 1px solid var(--steel-dark);
                                        border-radius: var(--radius);
                                        height: 1.44rem;
                                        font-size: var(--fs-sm);
                                        box-sizing: border-box;
                                        font-weight: bold;
                                        margin-left: 0.3em;
                                        line-height: 1.25rem;
                                        aspect-ratio: 1;
                                        background-color: var(--blue-dark);
                                        text-align: center;
                                        cursor: pointer;
                                    }
                                }
                            }
                        }
                    }
                }

                & #logins_saved {
                    & li {
                        padding: 0.31rem 0.5rem 0.62rem 0;
                        text-align: left;
                    }

                    & div {
                        font-size: var(--fs-xs);
                        padding: 0 0 0 1.06rem;
                        font-weight: bold;
                    }
                }
            }

            & #topmenu_right {
                display: block;
                position: absolute;
                top: 3.62rem;
                left: 45.88rem;
                width: 10.94rem;
                color: var(--white);
                font-size: var(--fs-xxs);
                padding: 0.19rem 0 0 0;
                text-align: right;
                z-index: 8000;
                height: 1.88rem;

                & #abonnementsboks {
                    height: 2.5rem;
                    margin: 0.5em 0 0 2em;
                    border: 0.12rem solid var(--white);
                    display: none;
                    z-index: 9999;
                    text-align: left;
                    padding: 0.5em 1em 1.5em 1em;
                    width: 9.38rem;
                    color: var(--white);
                    background-color: var(--steel);
                }

                &:hover #abonnementsboks {
                    display: block;
                    z-index: 8000;
                }
            }

            & .expire,
            & .active {
                text-decoration: none;
                color: var(--white);
            }

            & .expire { font-weight: bold; }

            & .expired {
                text-decoration: none;
                color: var(--brand-pink);
                font-weight: bold;
            }
        }
    }

    #if_bottom {
        display: none;

        @media (min-width: 64em) {
            display: block;
            height: 1.62rem;
            width: var(--content-inner);
            line-height: 1.62rem;
            text-align: center;
            background-image: linear-gradient(to bottom, var(--gray-line-soft), var(--gray-soft));
            border-bottom-left-radius: var(--radius-lg);
            border-bottom-right-radius: var(--radius-lg);
        }
    }
}