/* Nomad Anarchy Blog. Each theme has its own background image. Light is the default. */
* { box-sizing: border-box; }

html {
    min-height: 100%;
    background-color: #4c6353;
    color-scheme: light;
    scrollbar-width: thin;
    scrollbar-color: #b0a890 #e4e0d0;
}

/* Paths are relative to this stylesheet, not the current page. */
html::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url('./bg-light.jpg') center center / cover no-repeat;
}
html[data-theme="dark"]::before { background-image: url('./bg-dark.jpg'); }

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0,0,0,0.30);
}
html[data-theme="dark"] body::before { background: rgba(0,0,0,0.20); }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #2a2620;
}

a { color: #33404e; text-decoration: underline; }
a:visited { color: #4a3a2c; }
a:hover { color: #1a2028; }
a:focus-visible, button:focus-visible {
    outline: 2px solid #33404e;
    outline-offset: 2px;
}

.wrap {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 30px 10px 20px;
}

.site-title {
    margin: 0;
    text-align: center;
    font-size: 64px;
    line-height: 1.1;
    font-weight: 900;
    color: #e8dfc4;
    text-shadow: 0 2px 3px rgba(0,0,0,0.6), 0 4px 14px rgba(0,0,0,0.7);
}
.site-title a, .site-title a:visited { color: inherit; text-decoration: none; }
.site-subtitle {
    margin: 3px 0 12px;
    text-align: center;
    font-size: 22px;
    color: #e8dfc4;
    text-shadow: 0 2px 3px rgba(0,0,0,0.6), 0 4px 14px rgba(0,0,0,0.7);
}

.nav {
    position: relative;
    margin: 0 0 12px;
    padding: 4px 36px 4px 12px;
    background: rgba(250,247,238,0.74);
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}
.nav a, .nav a:visited {
    margin: 0 6px;
    color: #2a2620;
    text-transform: uppercase;
    text-decoration: none;
}
.nav a:hover { color: #000; text-decoration: underline; }
.nav-sep { margin: 0 2px; color: #8a8270; }
.theme-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px;
    border: none;
    background: none;
    color: #2a2620;
    cursor: pointer;
    line-height: 0;
    font: inherit;
}
.theme-btn svg { display: block; }

.layout { display: flex; align-items: flex-start; gap: 8px; }
.content-column { flex: 1; min-width: 0; max-width: 700px; }
.panel {
    background: rgba(250,247,238,0.74);
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    color: #2a2620;
}
main.panel {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    overflow-wrap: anywhere;
}
h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.25; }
h2 { margin: 0 0 5px; font-size: 20px; line-height: 1.3; }
p { margin: 0 0 14px; }
main > :last-child { margin-bottom: 0; }

/* cream text sits directly on the flat background color; if a background photo is added later, add a dim layer (like the main site's) and recheck contrast before removing this comment. */
.breadcrumb {
    margin-bottom: 10px;
    color: #e8dfc4;
    font-size: 11px;
    overflow-wrap: anywhere;
}
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.breadcrumb li:not(:last-child)::after { content: "\00bb"; margin: 0 6px; }
.breadcrumb a, .breadcrumb a:visited { color: #e8dfc4; }
.breadcrumb a:hover { color: #fff; }
.category-label { margin: 0 0 7px; font-size: 12px; }
.post-meta { margin: 0 0 10px; color: #4a4232; font-size: 12px; }
.post-list { list-style: none; margin: 24px 0 0; padding: 0; }
.post-list > li { margin: 0 0 24px; }
.post-list > li:last-child, .post-list p:last-child { margin-bottom: 0; }
.steps { margin: 0 0 16px; padding-left: 24px; }
.steps li { margin-bottom: 10px; }
.server-address { user-select: all; }

.sidebar {
    flex: 0 0 200px;
    width: 200px;
    padding: 12px;
    font-size: 12px;
    overflow-wrap: anywhere;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: 6px; }
.sidebar li:last-child { margin-bottom: 0; }
/* cream text sits directly on the flat background color; if a background photo is added later, add a dim layer (like the main site's) and recheck contrast before removing this comment. */
footer { margin-top: 16px; color: #e8dfc4; font-size: 11px; }

.skip { position: absolute; left: -10000px; top: 0; }
.skip:focus {
    position: fixed;
    left: 10px;
    top: 10px;
    z-index: 10;
    padding: 6px 10px;
    background: rgba(250,247,238,0.74);
    border: 1px solid rgba(255,255,255,0.75);
}
.site-title a:focus-visible, .breadcrumb a:focus-visible { outline-color: #e8dfc4; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #e4e0d0; border: 1px solid #8a8270; }
::-webkit-scrollbar-thumb { background: #b0a890; border: 1px solid #8a8270; }
::-webkit-scrollbar-thumb:hover { background: #9a9280; }

html[data-theme="dark"] {
    background-color: #304125;
    color-scheme: dark;
    scrollbar-color: #3a4250 #1a2028;
}
html[data-theme="dark"] body { color: #e8dfc4; }
html[data-theme="dark"] a { color: #e8dfc4; }
html[data-theme="dark"] a:visited { color: #c8bfa4; }
html[data-theme="dark"] a:hover { color: #fff; }
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] button:focus-visible { outline-color: #e8dfc4; }
html[data-theme="dark"] .site-title a,
html[data-theme="dark"] .site-title a:visited { color: inherit; }
html[data-theme="dark"] .panel,
html[data-theme="dark"] .nav,
html[data-theme="dark"] .skip:focus {
    background: rgba(10,10,12,0.6);
    border-color: rgba(255,255,255,0.3);
    color: #e8dfc4;
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .nav { box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
html[data-theme="dark"] .nav a,
html[data-theme="dark"] .nav a:visited,
html[data-theme="dark"] .theme-btn { color: #e8dfc4; }
html[data-theme="dark"] .nav a:hover { color: #fff; }
html[data-theme="dark"] .nav-sep { color: #555; }
html[data-theme="dark"] .post-meta { color: #a89f84; }
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .breadcrumb a:visited { color: #e8dfc4; }
html[data-theme="dark"] .breadcrumb a:hover { color: #fff; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #1a2028; border-color: #000; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a4250; border-color: #000; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #4a5260; }

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .content-column { width: 100%; margin: 0 auto; }
    .sidebar { flex: none; width: 100%; max-width: 700px; margin: 0 auto; }
}
@media (max-width: 600px) {
    .site-title { font-size: 44px; }
}
