/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *


 */

/* ========== PALETTE: WARM ========== */
/* Light - warm (soft sepia) */
:root {
    --bg-color: #f7f3eb;
    --text-color: #433422;
    --link-color: #996633;
    --link-hover: #b8860b;
    --border-color: #a89070;
    --pre-bg: #ede6d8;
    --pre-shadow: rgba(0, 0, 0, 0.15);
}

/* Dark - warm (sepia/amber) */
:root.dark-theme {
    --bg-color: #1a1814;
    --text-color: #d4cfc4;
    --link-color: #d4a574;
    --link-hover: #e8c9a0;
    --border-color: #4a453c;
    --pre-bg: #252219;
    --pre-shadow: rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) {
        --bg-color: #1a1814;
        --text-color: #d4cfc4;
        --link-color: #d4a574;
        --link-hover: #e8c9a0;
        --border-color: #4a453c;
        --pre-bg: #252219;
        --pre-shadow: rgba(0, 0, 0, 0.4);
    }
}

/* ========== PALETTE: COOL ========== */
/* Light - cool (slate) */
:root.palette-cool {
    --bg-color: #f4f6f8;
    --text-color: #1e2a38;
    --link-color: #3a6ea5;
    --link-hover: #5588bb;
    --border-color: #5a7a98;
    --pre-bg: #e4e9ee;
    --pre-shadow: rgba(0, 0, 0, 0.12);
}

/* Dark - cool (nord) */
:root.dark-theme.palette-cool {
    --bg-color: #2e3440;
    --text-color: #d8dee9;
    --link-color: #88c0d0;
    --link-hover: #8fbcbb;
    --border-color: #4c566a;
    --pre-bg: #3b4252;
    --pre-shadow: rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    :root.palette-cool:not(.light-theme):not(.dark-theme) {
        --bg-color: #2e3440;
        --text-color: #d8dee9;
        --link-color: #88c0d0;
        --link-hover: #8fbcbb;
        --border-color: #4c566a;
        --pre-bg: #3b4252;
        --pre-shadow: rgba(0, 0, 0, 0.3);
    }
}

/* Theme toggle buttons */
.theme-toggles {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
}

.theme-toggle, .palette-toggle, .font-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.theme-toggle:hover, .palette-toggle:hover, .font-toggle:hover {
    opacity: 1;
}

/* Font families */
:root {
    --font-serif: 'Noto Serif JP', Georgia, serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-dyslexic: 'OpenDyslexic', sans-serif;
    --current-font: var(--font-serif);
}

:root.font-sans {
    --current-font: var(--font-sans);
}

:root.font-dyslexic {
    --current-font: var(--font-dyslexic);
}

.font-toggle {
    font-family: var(--current-font);
    font-size: 16px;
    font-weight: 500;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--current-font);
    font-size: 130%;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.siteHeader {
    max-width: 800px;
    margin: 20px auto 0;
}

.siteHeader h1 {
    text-align: center;
    margin: 0 0 16px 0;
}

.siteHeader nav ul {
    display: flex;
    justify-content: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 85%;
    letter-spacing: 0.05em;
}

.siteHeader nav li {
    line-height: 1;
}

.siteHeader nav a {
    text-decoration: none;
}

@media (width <= 500px) {
    .siteHeader nav ul {
        flex-wrap: wrap;
        gap: 8px 24px;
    }
}

.rss-icon {
    fill: var(--link-color);
    vertical-align: middle;
    margin-left: 4px;
    shape-rendering: geometricPrecision;
}

.rss-link:hover .rss-icon {
    fill: var(--link-hover);
}

th,
td {
    padding: 4px 8px;
}

pre {
    padding: 12px;
    background-color: var(--pre-bg);
    box-shadow: -2px 3px 3px var(--pre-shadow);
    overflow-x: scroll;
}

@media (width <= 700px) {
    pre {
        font-size: 80%;
    }
}

@media (width > 700px) {
    pre {
        font-size: 75%;
    }
}

/* Skip link - hidden until focused */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bg-color);
    color: var(--link-color);
    padding: 8px;
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Visible focus states */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*/

a:link {
    color: var(--link-color);
}

a:visited {
    color: var(--link-color);
}

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

a:active {
    color: var(--link-hover);
}

.wikiBody {
    font-size: 90%;
    padding: 20px 0 20px;
    max-width: 800px;
    margin: auto;
    background-color: var(--bg-color);
}

.wikiBody pre {
    font-family: 'Ubunto Mono', monospace;
}

.wikiPageData {
    font-size: 80%;
    font-style: italic;
}

.wikiHeader {
    font-size: 110%;
    padding: 40px 0 5px;
    max-width: 800px;
    margin: auto;
    background-color: var(--bg-color);
}

.wikiFooter {
    font-size: 70%;
    padding: 40px 0 5px;
    max-width: 800px;
    margin: auto;
    background-color: var(--bg-color);
}

.wikiFooter ul {
    list-style-type: none;
    padding: 0;
}

.wikiFooter li {
    display: inline;
    padding-right: 10px;
}

.wikiFooterFloat {
    float: right;
}

.wikiFooterFloat ul {
    margin-top: 0px;
}

.findInput {
    text-align: center;
    max-width: 800px;
    margin: auto;
}

.findInput div {
    display: inline-block;
    padding-right: 20px;
}

.findForm {
    text-align: right;
    vertical-align: middle;
    width: 300px;
    margin-bottom: 20px;
}

.findDetails {
    text-align: left;
    font-size: 80%;
    padding-bottom: 10px;
    width: 300px;
}

.findDetails b {
    text-decoration: underline;
    font-weight: normal;
}

.findResults {
    text-align: center;
    max-width: 800px;
    margin: auto;
}

.findResults ul {
    list-style-type: none;
}

.findResults li {
    display: inline;
    padding: 10px;
}
