/* ==========================================================================
   log.css : the look of the log.
   Concept: a late-90s weblog on a white page: Times, blue underlined
   links, two-tone beveled rules, a plain sidebar, small Verdana for
   navigation and search.
   Change colors here; everything else reads from these values.
   ========================================================================== */

:root {
  --page: #ffffff;      /* page background (#c0c0c0 for Mosaic gray) */
  --ink: #000000;
  --ink-soft: #2b2b2b;
  --link: #0000ee;
  --visited: #551a8b;
  --active: #ff0000;
  --well: #ffffff;      /* search field */
  --tint: #f2f2f2;      /* filter status box */
  --hi: #e2e2e2;        /* bevel highlight (lower line of a rule) */
  --lo: #999999;        /* bevel shadow (upper line of a rule) */
  --new: #cc0000;
  --warn: #ffffcc;

  --serif: "Times New Roman", Times, serif;
  --sans: Verdana, Geneva, Tahoma, sans-serif;
}

html { background: var(--page); }

body {
  margin: 0;
  padding: 10px 16px 32px;
  color: var(--ink);
  background: var(--page);
  font: 18px/1.45 var(--serif);
  -webkit-text-size-adjust: 100%;
}

.page { max-width: 1020px; }

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

a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 2px;
}

/* ---------- masthead ---------- */

.masthead h1 {
  font-size: 2.3em;
  line-height: 1.1;
  margin: 0.35em 0 0.15em;
}

.masthead h1 a,
.masthead h1 a:visited { color: var(--ink); text-decoration: none; }

.tagline {
  font-style: italic;
  margin: 0 0 0.5em;
}

.nav {
  font: 13px/1.6 var(--sans);
  margin: 0;
}

.nav a[aria-current="page"] { color: var(--ink); font-weight: bold; text-decoration: none; }

/* Masthead uses the same two columns as the page, so Find sits above the sidebar. */
.mast-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 256px;
  gap: 32px;
  align-items: start;
}

.find {
  margin: 0.95em 0 0;
  font: 13px/1.4 var(--sans);
}

.find-row { display: flex; align-items: center; gap: 8px; }

.find label { font-weight: bold; }

.find-note { margin: 4px 0 0; color: var(--ink-soft); }
.find-note:empty { display: none; }

/* The classic inset horizontal rule */
hr.bevel {
  border: 0;
  border-top: 1px solid var(--lo);
  border-bottom: 1px solid var(--hi);
  height: 0;
  margin: 10px 0 14px;
}

/* ---------- two-column layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 256px;
  gap: 32px;
  align-items: start;
}

.layout > main { max-width: 38em; min-width: 0; }

@media (max-width: 780px) {
  body { font-size: 17px; padding: 8px 16px 28px; }
  .layout, .mast-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .mast-row { gap: 0; }
  .find { margin-top: 12px; }
  .layout > main { max-width: none; }
}

/* ---------- the log ---------- */

.day {
  font-size: 1em;
  font-weight: bold;
  margin: 1.5em 0 0.7em;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--lo);
}

.day:first-child,
.status + .day,
.problems + .day { margin-top: 0.4em; }

.entry { margin: 0 0 1.5em; scroll-margin-top: 12px; }

.entry h3 {
  font-size: 1.15em;
  line-height: 1.25;
  margin: 0 0 0.3em;
}

.entry .host { font-weight: normal; font-size: 0.8em; }

.new {
  display: inline-block;
  margin-left: 0.35em;
  padding: 1px 4px 2px;
  font: bold 10px/1 var(--sans);
  color: #ffffff;
  background: var(--new);
  vertical-align: 3px;
}

.summary p { margin: 0 0 0.6em; }
.summary p:last-child { margin-bottom: 0; }

.byline {
  font: 12px/1.6 var(--sans);
  color: var(--ink-soft);
  margin: 0.45em 0 0;
}

.status {
  font: 13px/1.5 var(--sans);
  margin: 0 0 1em;
  padding: 6px 8px;
  background: var(--tint);
  box-shadow: inset 1px 1px var(--lo), inset -1px -1px var(--hi);
}

.more { font: 13px/1.5 var(--sans); margin: 1.5em 0 0; }

/* Topics and Archives pages */
.index-list { margin: 0 0 1.4em; padding-left: 1.3em; }
.index-list li { margin: 0.3em 0; }
.index-list .when { font: 12px/1.5 var(--sans); color: var(--ink-soft); }
.day .count { font-weight: normal; }

/* search matches */
mark { background: #ffff66; color: inherit; padding: 0 1px; }

.empty { font-style: italic; }

.problems {
  font: 13px/1.5 var(--sans);
  background: var(--warn);
  border: 1px solid var(--ink);
  padding: 8px 10px;
  margin: 0 0 1.2em;
}

.problems strong { display: block; margin-bottom: 4px; }
.problems ul { margin: 0; padding-left: 1.3em; }

/* ---------- sidebar ----------
   A beveled vertical rule (gray line, white line) separates it from the log,
   matching the horizontal rules. Sections are plain headings and lists. */

.sidebar {
  padding-left: 22px;
  border-left: 1px solid var(--lo);
  box-shadow: inset 1px 0 0 var(--hi);
  font: 13px/1.5 var(--sans);
}

.side-section { margin: 0 0 22px; scroll-margin-top: 12px; }
.side-section:last-child { margin-bottom: 0; }

.side-section h2 {
  font: bold 13px/1.3 var(--sans);
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--lo);
  box-shadow: 0 1px 0 var(--hi);
}

.side-section p { margin: 0 0 0.5em; }
.side-section p:last-child { margin-bottom: 0; }

.side-section ul { list-style: none; margin: 0; padding: 0; }
.side-section li { margin: 0.2em 0; }
.side-section li.current > a { color: var(--ink); font-weight: bold; text-decoration: none; }
.side-section .note { font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }

.count { color: var(--ink-soft); }

@media (max-width: 780px) {
  .sidebar {
    padding: 18px 0 0;
    border-left: 0;
    box-shadow: none;
    border-top: 1px solid var(--lo);
  }
}

/* ---------- search field ---------- */

.field {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  font: 14px/1.3 var(--sans);
  padding: 5px 7px;
  border: 1px solid #6e6e6e;
  border-radius: 0;
  background: var(--well);
  color: var(--ink);
  box-shadow: inset 1px 1px 0 #b4b4b4;
  -webkit-appearance: none;
  appearance: none;
}

.field::placeholder { color: #6b6b6b; }

/* ---------- footer ---------- */

.colophon address {
  font-style: normal;
  font-size: 0.85em;
}

/* ---------- static pages (about) ---------- */

.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 1.25em; margin: 1.4em 0 0.4em; }

/* ---------- utility ---------- */

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

@media print {
  body { background: #fff; }
  .layout { display: block; }
  aside, .nav, .find { display: none; }
}
