:root{
  --mono-font:monospace;
  --sans-font:system-ui, sans-serif;
  --bg:#fff;
  --bg:light-dark(#fff, #000);
  --bg-dim:#fff;
  --bg-dim:light-dark(#fff, #111);
  --text:#000;
  --text:light-dark(#000, #ccc);
  --text-dim:#999;
  --link:var(--text);
  --link-blue:blue;
  --link-blue:light-dark(blue, #b5b5ff);
  --link-visited:#333;
  --link-visited:light-dark(#333, #aaa);
  --border:#333;
  --border:light-dark(#333, #888);
  --border-dim:#eee;
  --border-dim:light-dark(#eee, #555);
  --mode-border:light-dark(#555, #eee);
  --mode-dark:#555;
  --mode-light:#fff;
  --popcolor: #23b7d2;
}
html {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--popcolor) var(--border-dim);
}
table {
  min-width: 60%;
}

table, th, td {
  border: thin solid;
  border-collapse: collapse;
  padding: 0.4rem;
}

body{margin:0;padding:0;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;line-height:1.6;font-size:1rem;font-family:var(--sans-font)}

a{color:var(--link);overflow-wrap: anywhere;word-break: break-word;}
a:hover{color: var(--popcolor)}
::selection {
  background-color: var(--popcolor)
}

.typo {
  text-decoration: underline wavy red;
}

.mode-container{display:flex;align-items:center;gap:5px;position:absolute;top:50px;right:20px}
@media screen and (max-width:1024px){.mode-container{top:30px;gap:10px}}
.mode{display:block;width:18px;height:18px;line-height:0;text-indent:-10000px;border-width:2px;border-radius:6px;border-style:solid;border-color:var(--mode-border);opacity:.2;body{color:var(--popcolor)}}
.mode-container:hover .mode{opacity:1}
.mode:hover{cursor:pointer}
.mode:focus-visible{outline:1px solid var(--link-blue);opacity:1}

div.body img{width:100%;max-width:640px;height:auto}

.only-print{display:none}

a{color:var(--link);text-decoration:dotted underline 1px; border-radius: 5px; font-weight: bold; text-shadow: var(--text-dim) 1px 1px}

h1{font-style:italic;margin-bottom:.5rem;margin-top:-0.2rem;font-size:1.6rem;font-weight:600;line-height:1.25;letter-spacing:.004em;text-shadow: var(--text-dim) 1px 1px;}
h2{margin-bottom:.5rem;font-size:1.4rem;font-weight:600;line-height:1.25;letter-spacing:.009em}
h3{margin-bottom:.5rem;font-size:1.25rem;font-weight:600;line-height:1.25;letter-spacing:.009em}

p{margin:1rem 0}
hr{height:1px;background:var(--border);border:0}

.limiter{max-width:640px;min-width:0;padding-right:20px;padding-left:20px;margin-right:auto;margin-left:auto}
.pad2y{padding-top:20px;padding-bottom:20px}
.update{padding:1rem 1rem 0 1rem;background:#fffceb;border:1px solid #fbf1a9;border-radius:2px}

@media screen and (max-width: 1024px) {
  .header ul li {
    position: relative;
    display: inline-block;
    padding-right: 25px; 
  }
  .header-wrap{padding-bottom:15px;border-bottom:1px solid var(--text-dim)}

  .header ul li .arrow {
    position: absolute;
    right: 5px;
    top: 55%;
    transform: translateY(-50%);
    pointer-events: none;
  }
}
@media screen and (min-width:1025px){
  .header{position:absolute;top:42px;right:50%;margin-right:340px!important;letter-spacing:-.009em}
  .content h1:first-child{margin-top:0}
}
@media print{body{color:#000;}.no-print{display:none}.only-print{display:block}body{margin:0}.limiter{max-width:100%!important;padding:0!important;margin:0!important}a{color:#000;text-decoration:dotted underline 1px; border-radus: none; font-weight: bold; text-shadow: none;}}

:root{color-scheme:light dark}

/* === css for kramdown anchor links === */
h2[id],
h3[id],
h4[id],
h5[id],
h6[id] {
  position: relative;
  width: fit-content;
}

h2[id] > a:first-child,
h3[id] > a:first-child,
h4[id] > a:first-child,
h5[id] > a:first-child,
h6[id] > a:first-child {
  position: absolute;
  inset: 0;
}

h2[id]:hover,
h3[id]:hover,
h4[id]:hover,
h5[id]:hover,
h6[id]:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* === gallery === */
.gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, 170px); 
    justify-content: center; 
}

.gallery-item {
    margin:0;
}

.gallery-item img {
    display:block;
    width:100%;
    aspect-ratio:1;
    object-fit:cover;
    cursor:pointer;
}

.gallery-item figcaption {
    text-align:center;
    margin-top:.5rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
    position:fixed;
    inset:0;

    display:grid;
    place-items:center;

    opacity:0;
    visibility:hidden;
    pointer-events:none;

    transition:opacity .2s;

    z-index:9999;
}

.lightbox:target {
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

.lightbox-bg {
    position:absolute;
    inset:0;
    background:rgb(0 0 0 / .85);
}

.lightbox-figure {
    position:relative;
    z-index:1;

    margin:0;
}

.lightbox-figure img {
    display:block;
    max-width:min(90vw,1200px);
    max-height:85vh;
    width:auto;
    height:auto;
}

.lightbox-figure figcaption {
    margin-top:1rem;
    text-align:center;
    color:white;
}

.lightbox-close {
    position:absolute;
    top:-2.5rem;
    right:0;

    font-size:2rem;
    color:white;
    text-decoration:none;
}

