/* eggbaconchipsandbeans archive: front page and search. Same look as archive.russelldavies.com. */
@font-face { font-family: "et-book"; src: url("fonts/et-book-roman-line-figures.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: "et-book"; src: url("fonts/et-book-display-italic-old-style-figures.woff") format("woff"); font-weight: normal; font-style: italic; font-display: swap; }
@font-face { font-family: "et-book"; src: url("fonts/et-book-bold-line-figures.woff") format("woff"); font-weight: bold; font-style: normal; font-display: swap; }

:root {
  --bg: #fffff8;
  --ink: #111111;
  --muted: #6b675e;
  --faint: #b8b3a5;
  --rule: #e6e2d4;
  --panel: #f6f3e7;
  --accent: #9b2c24;
  --mark: #f6e3a1;
  --field: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a17; --ink: #ece8dc; --muted: #a8a294; --faint: #5f5b52; --rule: #34322c;
    --panel: #24221e; --accent: #e3867c; --mark: #6b5a1e; --field: #24221e;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1a17; --ink: #ece8dc; --muted: #a8a294; --faint: #5f5b52; --rule: #34322c;
  --panel: #24221e; --accent: #e3867c; --mark: #6b5a1e; --field: #24221e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: et-book, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.5;
}
.page { max-width: 44rem; margin: 0 auto; padding: 1.5rem 16px 3rem; }
a { color: var(--ink); text-decoration-color: var(--faint); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

.topline { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; color: var(--muted); }
.topline a { color: var(--muted); }

h1 { font-weight: normal; font-size: 2.6rem; line-height: 1.1; margin: 2.2rem 0 0.8rem; }
h2 { font-weight: normal; font-style: italic; font-size: 1.5rem; margin: 2.6rem 0 0.6rem; }
.lede { font-size: 1.25rem; margin: 0 0 1.6rem; }
.lede em { font-style: italic; }

/* Search form */
.search { display: flex; gap: 0.5rem; margin: 0 0 0.6rem; }
.search input[type="search"] {
  flex: 1; min-width: 0; font: inherit; font-size: 1.15rem; color: var(--ink);
  padding: 0.55rem 0.8rem; border: 1px solid var(--faint); border-radius: 4px; background: var(--field);
}
.search input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button, .button {
  font: inherit; font-size: 1rem; cursor: pointer; color: var(--bg); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 4px; padding: 0.5rem 1rem; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
button.quiet { background: transparent; color: var(--ink); border-color: var(--faint); }
button.quiet:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 0; }
.hint code { font-family: inherit; background: var(--panel); padding: 0 0.25em; border-radius: 3px; }

/* Month grid on the front page */
.months { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-top: 0.4rem; }
.months th { text-align: left; font-weight: normal; padding: 0.3rem 0.8rem 0.3rem 0; white-space: nowrap; }
.months th small { color: var(--muted); font-size: 0.78rem; margin-left: 0.3rem; }
.months td { padding: 0.3rem 0; text-align: center; border-top: 1px solid var(--rule); }
.months th { border-top: 1px solid var(--rule); }
.months td a { display: block; text-decoration: none; padding: 0 0.1rem; }
.months td a:hover { background: var(--panel); }
.months td span { color: var(--faint); }
.months .busy a { font-weight: bold; }
@media (max-width: 560px) {
  .months { font-size: 0.82rem; }
  .months th small { display: none; }
}

.panel { background: var(--panel); border-radius: 6px; padding: 1rem 1.2rem; margin: 1rem 0; }
.panel h3 { font-weight: normal; font-style: italic; font-size: 1.15rem; margin: 0 0 0.4rem; }
.panel ul { list-style: none; padding: 0; margin: 0; }
.panel li { margin: 0.2rem 0; }
.panel .when { color: var(--muted); margin-right: 0.4rem; font-variant-numeric: tabular-nums; }

/* Search results */
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; font-size: 0.9rem; color: var(--muted); margin: 0.4rem 0 1rem; }
.controls select { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--faint); border-radius: 4px; padding: 0.15rem 0.3rem; }
.status { color: var(--muted); margin: 1.2rem 0 0.4rem; min-height: 1.5em; }
.results { list-style: none; padding: 0; margin: 0; }
.result { display: flex; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.result .text { flex: 1; min-width: 0; }
.result .date { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.result h3 { font-weight: normal; font-size: 1.3rem; line-height: 1.25; margin: 0.1rem 0 0.25rem; overflow-wrap: anywhere; }
.result p { margin: 0; overflow-wrap: anywhere; }
.result mark { background: var(--mark); color: inherit; padding: 0 0.1em; border-radius: 2px; }
.result .thumb { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 4px; overflow: hidden; background: var(--panel); }
.result .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result .picture-only { color: var(--muted); font-style: italic; }
.more { text-align: center; margin: 1.5rem 0; }
@media (max-width: 560px) { .result .thumb { width: 72px; height: 72px; } }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--muted); }
footer a { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* eggbaconchipsandbeans: the A–Z list of cafés */
.cafes { list-style: none; padding: 0; margin: 0.4rem 0 0; columns: 2 18rem; column-gap: 2rem; }
.cafes li { break-inside: avoid; padding: 0.25rem 0; border-top: 1px solid var(--rule); }
.cafes .yr { color: var(--muted); font-size: 0.8rem; margin-left: 0.35rem; font-variant-numeric: tabular-nums; }
.letter { font-style: italic; color: var(--accent); }
