:root {
  --link: #996633;
  --link-visited: #cc9966;
  --link-hover: #ff8832;
  --ink: #333333;
  --muted: #888888;
  --footer: #999999;
  --line: rgba(128, 128, 128, 0.5);
  --sheet: rgba(255, 255, 255, 0.82);
  --card: #ffffff;
  --card-border: #dddddd;
  --page: #111111;
  --font: Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  --focus: 2px solid var(--link-hover);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  background-image: url("../theme/background.jpg");
  background-repeat: repeat;
  background-attachment: fixed;
  background-position: top right;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
}

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

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

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

:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(-150%);
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 3;
}

.skip:focus {
  transform: none;
}

.site {
  width: min(780px, calc(100% - 24px));
  margin: 20px auto 32px;
}

.banner {
  min-height: 135px;
  background: #6a93b5 url("../theme/header.jpg") left top / 100% 135px no-repeat;
  color: #fff;
}

.banner h1 {
  margin: 0;
  padding: 22px 16px 0 4%;
  font: 36px/1.05 var(--font);
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 6px rgba(0, 0, 0, 0.55);
}

.banner p {
  margin: 0;
  padding: 4px 20px 14px 4%;
  max-width: 38em;
  font-size: 17.5px;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 6px rgba(0, 0, 0, 0.45);
}

.banner a:link,
.banner a:visited,
.banner a:hover {
  color: #fff;
  text-decoration: none;
}

.sheet {
  background: var(--sheet);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  padding: 15px 14px 22px;
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 246px;
  column-gap: 18px;
  align-items: start;
}

.date-header {
  margin: 4px 2px 8px;
  font: 700 13px/1.3 var(--font);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.date-header span {
  color: var(--muted);
}

.post {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  padding: 15px 18px 12px;
  margin: 0 0 20px;
}

.post-title {
  margin: 0 0 0.65em;
  font: 18px/1.3 var(--font);
  font-weight: 400;
  color: var(--ink);
}

.post-title a:link,
.post-title a:visited {
  color: var(--ink);
}

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

.post-body {
  font-size: 110%;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.post-body img {
  max-width: 100%;
  height: auto;
}

.post-body .separator,
.post-body .mobile-photo,
.post-body .tr-caption-container {
  margin: 0.75em auto;
  text-align: center;
}

.post-body .tr-caption {
  font-size: 12px;
  color: #666;
}

.post-body table {
  max-width: 100%;
}

.post-body blockquote {
  margin: 1em 1.2em;
}

.post-body audio {
  width: min(100%, 320px);
  margin: 0.4em 0;
}

.embed {
  margin: 0.8em auto;
  max-width: 480px;
}

.embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: #000;
}

.youtube {
  position: relative;
  background: #000;
}

.youtube-poster {
  display: block;
  position: relative;
  color: #fff;
  text-decoration: none !important;
}

.youtube-poster img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.youtube-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 14px / 10px;
  background: rgba(200, 0, 0, 0.88);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.youtube-play::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}

.youtube-poster:hover .youtube-play,
.youtube-poster:focus-visible .youtube-play {
  background: #cc0000;
}

.youtube-watch {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  font: 11px/1.3 Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 2px;
}

.embed-soundcloud iframe {
  aspect-ratio: auto;
  height: 166px;
}

.audio-note {
  margin: 0.6em 0 1em;
}

.post-footer {
  margin-top: 0.85em;
  color: var(--footer);
  font-size: 13px;
  line-height: 1.6;
}

.post-footer-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0.9em;
}

.label-prefix {
  color: var(--footer);
}

.comments {
  margin-top: 0.4em;
}

.comments h3 {
  margin: 0.2em 0 0.4em;
  font: 18px/1.3 var(--font);
  font-weight: 400;
}

.comment {
  border-top: 1px dashed var(--line);
  padding: 0.75em 0;
}

.comment-meta {
  margin-top: 0.3em;
  color: var(--footer);
  font-size: 12px;
}

.pager {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin: 2px 2px 8px;
  font-size: 18px;
}

.pager .newer {
  margin-right: auto;
}

.search-count,
.view-note {
  margin: 2px 2px 12px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar h2 {
  margin: 1.15em 0 0.35em;
  font: 700 13px/1.3 var(--font);
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sidebar .widget:first-child h2 {
  margin-top: 0.15em;
}

.about p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ruled li {
  border-top: 1px dashed var(--line);
  padding: 4px 0;
  font-size: 13px;
}

.ruled li:first-child {
  border-top: none;
}

.avatar-mark {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: text-bottom;
  background: #f57c00;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.count {
  color: var(--muted);
}

.archive summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  padding: 1px 0;
}

.archive summary::-webkit-details-marker {
  display: none;
}

.archive summary::before {
  content: "►";
  display: inline-block;
  width: 1.15em;
  color: #666;
  font-size: 10px;
}

.archive details[open] > summary::before {
  content: "▼";
}

.archive ul ul {
  margin-left: 1.15em;
}

.month-posts a {
  display: inline-block;
  padding: 1px 0;
  font-size: 13px;
}

.search-form {
  display: flex;
  gap: 4px;
  align-items: center;
}

.search-form input[type="search"] {
  width: 100%;
  min-width: 0;
  font: 13px var(--font);
  padding: 2px 4px;
  border: 1px solid #bbb;
  background: #fff;
  color: #000;
}

.search-form button {
  font: 13px var(--font);
  padding: 2px 8px;
  border: 1px solid #888;
  background: #f5f5f5;
  color: #222;
  cursor: pointer;
}

.search-form button:hover {
  border-color: var(--link-hover);
}

.site-footer {
  margin-top: 0;
  padding: 12px 14px 14px;
  background: rgba(0, 0, 0, 0.45);
  color: #cccccc;
  font-size: 12px;
}

.site-footer a:link,
.site-footer a:visited {
  color: #eebb98;
}

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

@media (prefers-reduced-motion: no-preference) {
  a,
  .search-form button {
    transition: color 120ms ease, border-color 120ms ease;
  }
}

@media (max-width: 840px) {
  body {
    background-attachment: scroll;
  }

  .site {
    width: auto;
    margin: 0;
  }

  .columns {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-top: 8px;
  }

  .banner {
    min-height: 120px;
    background-size: cover;
    background-position: left center;
  }

  .banner h1 {
    font-size: 30px;
    padding-top: 18px;
  }

  .banner p {
    font-size: 15px;
  }
}
