@import url("../fonts.css");
@import url("../links.css");

:root {
  --focus-color: rgba(255, 255, 255, 0.55);
  --focus-color-light: rgba(0, 0, 0, 0.58);
}

:where(a, button, input, select, textarea, summary, audio, [tabindex]):focus-visible {
  outline: 1px solid var(--focus-color);
  outline-offset: 3px;
}

.note :where(a, button, input, select, textarea, audio, [tabindex]):focus-visible {
  outline-color: var(--focus-color-light);
}


body {
  background: #181818;
  color: #f0f0f0;
  font-family: "Archivo", Arial, sans-serif;
  margin: 0;
  padding: var(--protected-page-gutter);
}

#fieldnotes-container {
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
  line-height: 1.6;
  padding-left: var(--surface-clearance);
  padding-right: var(--surface-clearance);
  padding-top: 140px;
  box-sizing: border-box;
}


.return-icon {
  position: fixed;
  top: 20px;
  left: 20px;
  color: #f0f0f0;
  text-decoration: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  line-height: 0;
  font-size: 1.8em;
  z-index: 100;
  opacity: .68;
  transition: opacity .18s ease;
}
.return-icon:hover,
.return-icon:focus-visible { opacity: 1; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}


.note {
  background: #f0f0f0;
  color: #000;
  border-radius: 0;
  padding: 18px;
  margin: 0 0 1.25rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.note-date {
  max-width: 40rem;
  margin: 4px auto 0;
  font-size: .9em;
  color: #333;
}
.permalink {
  color: inherit;
  --editorial-link-rest-opacity: .6;
}

.note-content {
  display: block;
  font-size: 1rem;
  line-height: 1.7;
  word-wrap: break-word;
  max-width: 40rem;
  margin: 0 auto;
  white-space: normal; 
}

.watermark-group {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  text-align: center;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
.watermark {
  font-size: 1.2em;
  color: rgba(255,255,255,.25);
  letter-spacing: 2px;
  text-transform: lowercase;
  display: block;
  margin: 0;
}

.month-section { border: 1px solid transparent; border-radius: 0; padding: 1px 0; }
.month-toggle {
  list-style: none;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  color: rgba(255,255,255,.58);
  margin: 0 0 1rem;
  font-weight: 400;
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding-bottom: .5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color .2s ease;
}
.month-section + .month-section .month-toggle { margin-top: 2rem; }
.month-toggle::marker { content: ""; }
.month-toggle::after {
  content: "+";
  font-size: 1rem;
  margin-left: 1rem;
  color: rgba(255,255,255,.55);
  transition: color .2s ease;
}
details[open] > .month-toggle { color: #f0f0f0; }
details[open] > .month-toggle::after { content: "–"; color: #f0f0f0; }
.month-toggle:hover,
.month-toggle:focus-visible { color: rgba(255,255,255,.82); }


.fieldnote-container { display: flex; align-items: flex-start; gap: 12px; }
.fieldnote-img {
  max-width: 140px;
  height: auto;
  flex-shrink: 0;
  border-radius: 0;
}


.audio-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.5em 0;
}

audio {
  width: 200px;
  height: 32px;
  background: rgb(255, 255, 255);     
  border-radius: 9px;   
  filter: none;
  border: none;
  opacity: 0.65;
}


audio::-webkit-media-controls-panel {
  background-color: transparent;
}


audio::-webkit-media-controls-play-button {
  filter: invert(40%);
}


audio::-webkit-media-controls-mute-button,
audio::-webkit-media-controls-volume-slider,
audio::-webkit-media-controls-time-remaining-display {
  display: none;
}


#notes-root img {
  cursor: zoom-in;
}

#notes-root a img,
#notes-root img[data-video] {
  cursor: pointer;
}

.img-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.img-modal.is-open {
  display: block;
}

.img-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.86);
}

.img-modal__figure {
  position: relative;
  z-index: 1;
  margin: 0;
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 28px);
  box-sizing: border-box;
}

.img-modal__img {
  max-width: min(1200px, 96vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  cursor: zoom-out;
}

.img-modal__caption {
  margin-top: 10px;
  max-width: min(1200px, 96vw);
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  line-height: 1.4;
  text-align: center;
}

.img-modal__close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #f0f0f0;
  font-size: 28px;
  line-height: 44px;
  cursor: pointer;
  opacity: .72;
  transition: opacity .18s ease;
}

.img-modal__close:hover,
.img-modal__close:focus-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .return-icon,
  .img-modal__close {
    transition: none;
  }
}


@media (prefers-color-scheme: dark) {
  audio {
    background: rgba(255, 255, 255, 0.08);
    filter: invert(100%) contrast(120%);
  }
}

@media (max-width: 600px) {
  body {
    padding: 1.25rem var(--protected-page-gutter) 2.5rem;
  }

  #fieldnotes-container {
    padding-top: 100px;
  }

  .note {
    padding: 18px;
    margin: 0 0 1.25rem;
    border-radius: 0;
  }

  .note-content {
    font-size: .98rem;
    line-height: 1.7;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .month-toggle {
    font-size: 1rem;
    margin-bottom: .8rem;
  }

  .month-section + .month-section .month-toggle { margin-top: 1.6rem; }

  .fieldnote-container { display: block; }

  .fieldnote-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 12px;
    border-radius: 0;
  }

  audio {
    width: 100%;
    max-width: 320px;
  }
}

@media (min-width: 800px) {
  #fieldnotes-container {
    max-width: 1200px;
    margin: 0 auto;
  }
}


@media (prefers-reduced-motion: reduce) {
  .month-toggle,
  .month-toggle::after { transition: none; }
}

.video-thumb-wrap {
  position: relative;
  display: inline-block;
}

.video-thumb-wrap::after {
  content: "▷";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #f0f0f0;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  pointer-events: none;
}

#notes-root img[data-video] {
  cursor: pointer;
}

#video-modal-target {
  max-width: min(1200px, 96vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  background: #000;
  cursor: default;
}

.fieldnote-caption {
  margin: 0;
}

.fieldnote-caption em,
.fieldnote-caption i {
  font-style: italic;
}

.fieldnote-quote {
  display: block;
  margin-top: 0.6em;
  font-style: italic;
}

.fieldnote-credit {
  display: block;
  margin-top: 0.2em;
  font-size: 0.9em;
  opacity: 0.75;
}

.itch-embed {
  width: 100%;
  max-width: 552px;
  margin: 1rem auto;
  overflow: hidden;
}

.itch-embed iframe {
  display: block;
  width: 100%;
  max-width: 552px;
  height: 167px;
  border: 0;
}
