* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.logo {
    display: block;       
    width: 200px;         
    height: auto;         
    margin: 1rem auto 2rem auto;  
}
@media (max-width: 600px) {
    .logo {
        width: 120px;
    }
}
.topline {
    background-color: #BC002D;
    color: #002F6C;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
    font-size: 0.9rem;   
}
.logo-small {
    height: 40px;     
    width: auto;
    display: block;
}
.logo-link {
    display: inline-block;
}
.logo-medium {
    height: 80px;     
    width: auto;
    display: block;
}
.bottomline {
    background-color: #002F6C;
    color: #BC002D;
    padding: 0.75rem 1rem;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
    font-size: 0.9rem;
    text-shadow:
        -1px -1px 0 black,
         1px -1px 0 black,
        -1px  1px 0 black,
         1px  1px 0 black;
}
.content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}
.content h1 {
    text-align: center;
    margin-bottom: 2rem;
}
.content h2 {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid #ddd;
}
.content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid #ccc;
    font-size: 1.1rem;
    font-weight: 600;
}
.leipateksti {
    padding-left: 1.5rem;
    border-left: 3px solid #ddd;
}
a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.8em;
}
rt {
    font-size: 0.6em;
    line-height: 1;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

th, td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

th {
    background-color: #f4f6f8;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --header-bg: #222;
    --border-color: #ddd;
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: 
        background-color 0.4s ease,
        color 0.4s ease;
}

.top-header {
    background-color: var(--header-bg);
}

.content h2,
.leipateksti {
    border-left: 3px solid var(--border-color);
}
body.dark {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --border-color: #444;
}

#theme-toggle {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    background: var(--header-bg);
    color: #999999;
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: scale(1.05);
}