/* Innotrafik Legal — minimal branding matching portal theme */

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

:root {
    --background: oklch(1 0 0);
    --foreground: oklch(0.141 0.005 285.823);
    --muted-foreground: oklch(0.552 0.016 285.938);
    --border: oklch(0.92 0.004 286.32);
    --primary: oklch(0.795 0.184 86.047);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    color: var(--foreground);
    background: var(--background);
}

/* ── Header ── */

header {
    border-bottom: 1px solid var(--border);
}

header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 48rem;
    padding: 1rem 1.5rem;
    margin: 0 auto;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

header .subtitle {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ── Language nav ── */

.lang-nav {
    display: flex;
    gap: 0.25rem;
}

.lang-nav a {
    padding: 0.25rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    border-radius: 0.375rem;
    transition:
        background 0.15s,
        color 0.15s;
}

.lang-nav a:hover {
    color: var(--foreground);
    background: var(--border);
}

.lang-nav a.active {
    color: var(--background);
    background: var(--foreground);
}

/* ── Main content ── */

main {
    max-width: 48rem;
    padding: 2.5rem 1.5rem;
    margin: 0 auto;
}

main > h2 {
    margin-bottom: 0.5rem;
    font-size: 1.875rem;
    font-weight: 700;
}

main > .meta {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ── Language sections (CSS-only toggle) ── */

.lang-section {
    display: none;
}

.lang-section:target {
    display: block;
}

/* Default: show Finnish when no hash */
.lang-section.default-visible {
    display: block;
}
.lang-section.default-visible:has(~ .lang-section:target) {
    display: none;
}
/* Also hide default when ANY sibling is targeted */
.lang-section:target ~ .lang-section.default-visible {
    display: none;
}

/* ── Prose ── */

.prose section {
    margin-bottom: 2rem;
}

.prose h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.prose h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.prose p {
    margin-bottom: 0.75rem;
}

.prose ul {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    list-style: disc;
}

.prose li {
    margin-bottom: 0.25rem;
}

.prose .legal-basis {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ── Footer ── */

footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

footer .inner {
    max-width: 48rem;
    padding: 1.5rem;
    margin: 0 auto;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

footer p {
    margin-bottom: 0.125rem;
}

/* ── Utilities ── */

strong {
    font-weight: 600;
}
