/* Narizones.net - palette derives from the 2010 WordPress theme
   (wp-content/themes/narizones-20100428/), darkened where needed to meet WCAG AA contrast on the white panel. */

:root {
  --green: #008a00;
  --green-link: #198930;
  --green-hover: #2f8729;
  --red-title: #ff0000;
  --brown-date: #a26a16;
  --page-bg: #cccccc;
  --panel-bg: #ffffff;
  --text: #333333;
  --muted: #767676;
  --border: #e0e0e0;
  --body-font: Verdana, Geneva, Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--text);
}

main {
  max-width: 60rem;
  margin: 0 auto;
  background: var(--panel-bg);
  display: flex;
  flex-flow: column nowrap;
  min-height: 100vh;
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.25);
}

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

/* Keyboard focus ring, global so it covers nav links, post links, pagination,
   archive <summary> toggles and the gallery. A single colour can't stay visible
   against both the white panel and the green nav/footer bars, so we pair a dark
   outline with a white box-shadow ring: whichever sits on the green bar shows up
   as white-on-green, whichever sits on the panel shows up as dark-on-white. */
:focus-visible {
  outline: 2px solid #333333;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #ffffff;
}

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

hr {
  border: none;
  height: 3px;
  background: var(--green);
  width: 50%;
  margin: 1rem auto;
}

/* ---- Content classes inherited from the WordPress theme -------------------
   The migrated post HTML still carries these, so they must keep working. */

.center, .centered { text-align: center; margin-inline: auto; }
.vignette, .vignetter { padding-block: 15px; }
.bordered img { border: solid 3px var(--green); }
.left { float: left; clear: left; margin-right: 1em; }
.right { float: right; clear: right; margin-left: 1em; }
.clear { clear: both; }
.small { font-size: 0.85em; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.box {
  border: 2px solid #707070;
  background: var(--border);
  margin: 1em 20px;
  padding: 10px;
}

/* ---- Pagination ---------------------------------------------------------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 1.5rem 15px;
}
.pagination a { font-weight: 600; }
.pagination-info { color: var(--muted); font-size: 0.85rem; }

/* ---- Archives ------------------------------------------------------------ */

.page-content {
  max-width: 80ch;
  width: 100%;
  margin: 0 auto;
  padding: 15px;
  line-height: 1.5;
}
.page-content h2 { color: var(--green); }

.archives-years details { margin-bottom: 0.5rem; }
.archives-years summary { cursor: pointer; padding: 0.25rem 0; }
.year-label { font-weight: bold; color: var(--green); }
.year-count, .month-count, .tag-count { color: var(--muted); font-size: 0.85em; }
.archives-months { padding-left: 1.5rem; }
.archives-months ul { margin: 0.25rem 0 0.75rem; padding-left: 1.25rem; }
.archives-months li { margin: 0.25rem 0; }

.archives-tags { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.tag-item { white-space: nowrap; }

.archive-back { margin: 0 0 1rem; font-size: 0.85rem; }

/* ---- Gallery grid -------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  padding: 15px;
}
.gallery-grid img {
  width: 100%;
  border: solid 3px var(--green);
}

/* ---- Splash page --------------------------------------------------------- */

body.splash {
  background: #ddff55;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
body.splash main {
  background: none;
  box-shadow: none;
  min-height: auto;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
}
body.splash img { max-width: min(800px, 90vw); }

/* ---- 404 ----------------------------------------------------------------- */

.not-found { padding: 15px; text-align: center; }
.not-found h2 { font-size: 4rem; margin: 0; color: var(--green); }

@media (width < 600px) {
  .left, .right { float: none; display: block; margin: 0 auto; }
  main { box-shadow: none; }
}
