/* base css for all pages (rebane2001's, in black & white) */
:root {
  --font-text: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
  --font-head: Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif;
  --font-mono: 'Nimbus Mono PS', 'Courier New', monospace;
  --font-code: Menlo, Consolas, "Ubuntu Mono", monospace;

  /* monochrome palette */
  --bg: #EDEDED;      /* page */
  --ink: #222;        /* body text, rules */
  --title: #000;      /* blog title */
  --nav: #777;        /* header links */
  --head: #111;       /* headings, code */
  --link: #000;       /* links */
  --line: #AAA;       /* link underline */
  --paper: #FFF;      /* art-frame, footnote flash */
}

/* note: no background on html, so the body color fills the whole window */
body {
  color: var(--ink);
  font-family: var(--font-text);
  line-height: normal;
  margin: 0.5rem auto;
  padding: 0.5rem 1rem 1px;
  max-width: 768px;
  background: var(--bg);
  border-radius: 4px;
}

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

header > nav > ul {
  font-family: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif;
  color: var(--title);
  margin: 0;
  padding: 0;
  font-size: 2rem;
  font-weight: bold;
}

header > nav > ul > li {
  display: inline;
}

header > nav > ul > li > a {
  color: var(--nav);
}

#tags > ul {
  margin: 0;
  padding: 0;
}

#tags > ul, #tags > ul > li {
  display: inline;
}

a#blogTitle {
  color: var(--title);
}

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

a {
  color: var(--link);
  text-decoration: none;
}

main a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}

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

main h1 a, main h2 a, #tags a, .footnote-ref, .footnote-backref, figure a, a.rss {
  text-decoration: none;
}

#subMeta {
  width: 100%;
  text-align: center;
}

#title {
  margin: 0 0 0.5rem;
  text-align: center;
}

h2 {
  margin: 0;
}

h1, h2, h2 > a, h1 > a {
  color: var(--head);
}

h1, h2, #subMeta {
  font-family: var(--font-head);
}

.tag { }

::selection {
  background: var(--ink);
  color: var(--bg);
}

code, pre {
  font-family: var(--font-mono);
  color: var(--head);
  font-size: 90%;
}

sup {
  line-height: 0;
}

.footnotes :target p, p:has(sup:target .footnote-ref) {
  animation: 2s footnote 1 linear;
  border-radius: 4px;
}

@keyframes footnote {
  10% {
    background: var(--paper);
  }
}

.footnotes li:target {
  &::marker { font-weight: 600; }
  p {
    padding-left: 8px;
    border-left: 2px solid var(--head);
  }
}

/* Really cursed hack to make footnotes scroll better */
html:has(sup:target .footnote-ref) { animation: 0.1s scroll-padding 1 linear; }

@keyframes scroll-padding {
  from {
    scroll-padding-top: 25dvh;
  }
}

art-frame {
 container-type: inline-size;
 container-name: art;
 display: block;
 width: 100%;
 border-radius: 4px;
 overflow: clip;
 min-height: 16px;
 background: var(--paper);
 content-visibility: auto;
 &[flex] {
   display: flex;
 }
 &[center] {
   display: flex;
   align-items: center;
   justify-content: center;
 }
}

/* ---- m5rcel's additions ---- */

/* the little "RSS :3" button, rebane's bevelled badge in grey.
 * her orange: background #F60, borders #FFC8A4 / #FF9A57 / #7D3302 / #3F1A01 */
.rssBadge {
  display: inline-block;
  height: 12px;
  border-top: solid 1px #CCC;
  border-left: solid 1px #999;
  border-right: solid 1px #2A2A2A;
  border-bottom: solid 1px #000;
  color: #FFF;
  background: #555;
  font-family: monospace;
  font-weight: bold;
  text-shadow: 1px 1px 2px #0004;
  line-height: 12px;
  font-size: 10px;
  padding: 0 3px;
}

/* "2026-11-03 ¦ meta php" */
#subMeta .sep {
  color: var(--nav);
}

/* images & videos in posts ([img ...], [video ...], [youtube ...]) */
img, video, iframe {
  max-width: 100%;
}

figure {
  margin: 1rem 0;
  text-align: center;
}

figure img, figure video {
  max-height: 80vh;
  height: auto;
  border-radius: 4px;
  vertical-align: middle;
}

figure audio {
  width: 100%;
}

figcaption {
  font-size: 90%;
  font-style: italic;
  margin-top: 0.25rem;
}

.embed {
  aspect-ratio: 16 / 9;
}

.embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
}

pre {
  overflow-x: auto;
}

/* admin - deliberately ugly, a bit wider */
body.admin { max-width: 1100px; }
form.inline { display: inline; }
.linkButton { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; }
.flash { background: var(--paper); padding: 0.25rem 0.5rem; border-radius: 4px; }
.error { background: var(--paper); border: 2px solid var(--ink); font-weight: bold; padding: 0.25rem 0.5rem; border-radius: 4px; }
table.editor { width: 100%; }
table.editor td:first-child { width: 5rem; vertical-align: top; }
table.editor input[type=text] { width: 100%; box-sizing: border-box; font-family: var(--font-code); }
table.editor label { display: block; }
textarea { width: 100%; box-sizing: border-box; font-family: var(--font-code); font-size: 14px; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; border-bottom: 1px solid var(--ink); }
table.list td { padding: 2px 4px 2px 0; }
.uploader small { opacity: 0.7; }
#uploadStatus { font-family: var(--font-code); font-size: 90%; }
.preview { border: 1px dashed var(--ink); padding: 0.5rem 1rem; margin-bottom: 1rem; border-radius: 4px; }
