/* ===== Design tokens ===== */
:root {
    --bg: #0f172a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #30e0b6;
    --ring: #30e0b6;
    --panel: rgba(17, 24, 39, .85);
    --border: rgba(148, 163, 184, .22);
}

/* Respektera OS-darkmode (beh�ller dina v�rden men l�ter browsern optimera) */
:root {
    color-scheme: dark;
}

/* Rubriker och posttitlar alltid tydliga */
h1, h2, h3, .post-title {
    color: var(--text);
}

/* Globalt radavst�nd (lite luftigare p� mobil) */
@media (max-width: 768px) {
    body {
        line-height: 1.65;
    }
}


/* ===== Base ===== */
html {
    scrollbar-gutter: stable;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1:focus {
    outline: none;
}

/* L�nkar: neutral global default */
a {
    color: var(--text);
    text-decoration: none;
    transition: color .15s ease;
}

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

/* ===== App-layout (sticky footer) ===== */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding-top: 1rem;
}

/* ===== Sektioner (�teranv�nds av sidor) ===== */
.section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

    .section:first-of-type {
        padding-top: 4rem;
    }

    /* Men de efterf�ljande f�r mindre mellanrum */
    .section + .section {
        padding-top: 2rem; /* mindre luft mellan sektionerna */
    }

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

/* ===== Blazor default UI (valfritt) ===== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    z-index: 1000;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
}

    #blazor-error-ui .dismiss {
        position: absolute;
        right: .75rem;
        top: .5rem;
        cursor: pointer;
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: .6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--accent);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
            transition: stroke-dasharray .05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto .2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }