/* ═══════════════════════════════════════════════════════════════════
   SCRATCHPAD · a sibling of Temenos
   Same inks and typefaces as the garden, set looser: one narrow column
   of short notes, newest first, each under a small date.
   ═══════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-700-italic.woff2") format("woff2"); font-style: italic; font-weight: 700; font-display: swap; }
@font-face { font-family: "STIX Two Text"; src: url("fonts/stix-two-text-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }

:root {
  --accent: #5c2229;          /* oxblood, as in the garden */
  --accent-dark: #43161b;
  --accent-line: rgba(92, 34, 41, 0.3);
  --ink: #4a4a4a;             /* body text */
  --quiet: #767676;           /* dates, captions */
  --hairline: #e4e4e4;
  --wash: #f6f5f4;            /* code, highlights */

  --spectral: "Spectral", Georgia, serif;
  --caps: "STIX Two Text", "Times New Roman", Times, serif;
  --serif: "Times New Roman", Times, serif;

  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--spectral);
  font-size: 13px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: #efefef; color: #111; }

main, .masthead, footer {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── The name, like the garden's: spaced capitals, a comma, a hairline ── */
.masthead { padding-top: 4.5rem; padding-bottom: 3.25rem; }

.name {
  margin: 0;
  font: 600 1.2rem/1 var(--caps);
  letter-spacing: 0.155em;
  text-transform: uppercase;
}

.name a {
  display: flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
}

.name a::before { content: ","; order: 1; letter-spacing: 0; }
.name a::after { content: ""; order: 2; flex: 1; min-width: 2em; margin-left: 0.35em; border-top: 1px solid #d6d6d6; }

.subtitle {
  margin: 0.55rem 0 0;
  font: italic 0.9rem/1.4 var(--spectral);
  color: var(--quiet);
}

.subtitle a {
  font: 600 0.72rem var(--caps);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── The row of links beneath the subtitle, centred, in the garden menu's
   voice: lowercase grey Spectral with an italic first letter and a pale
   underline; the site you're on in oxblood bold ── */
.sites {
  margin: 0.8rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  row-gap: 0.4rem;
}
.sites a {
  font: 400 0.84rem/1.35 var(--spectral);
  text-transform: lowercase;
  color: var(--quiet);
  border-bottom: none;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.sites a::first-letter { font-style: italic; }
.sites a:hover { color: var(--accent); text-decoration-color: var(--accent-line); }
.sites a[aria-current=page] { color: var(--accent); font-weight: 700; text-decoration-color: var(--accent-line); }
.sites .sep { margin: 0 0.6em; color: #d8d8d8; font: 0.84rem var(--spectral); }

/* ── Links ── */
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover { color: var(--accent-dark); border-bottom-color: var(--accent); }

/* ── A day: its name like the masthead, small; a hairline running right ── */
.day { margin: 0 0 3.25rem; }

.dayname {
  display: flex;
  align-items: center;
  margin: 0 0 1rem;
  font: 600 0.72rem/1 var(--caps);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.dayname .date { color: var(--quiet); margin-left: 0.6em; }
.dayname::after { content: ""; flex: 1; min-width: 2em; margin-left: 0.8em; border-top: 1px solid var(--hairline); }

/* ── A note ── */
.post { padding: 0 0 1.5rem; }

/* its time beneath it, a link to the note on its own */
.when {
  display: table;                   /* on its own line, but only as wide as the time */
  margin: 0.75rem 0 0;
  font: italic 0.75rem/1 var(--spectral);
  color: #9a9a9a;
  border-bottom: none;
}
/* as a link: a faint grey line beneath, deepening to oxblood on hover */
a.when { padding-bottom: 1px; border-bottom: 1px solid #dcdcdc; }
a.when:hover { color: var(--accent); border-bottom-color: var(--accent); }

.body > :first-child { margin-top: 0; }
.body > :last-child { margin-bottom: 0; }
.body p { margin: 0 0 0.8em; }

/* justified, with hyphenation so the spacing stays even */
.body p, .body li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* links inside notes set like ABYSSATA beneath the name: small spaced capitals */
.body a {
  font: 600 0.8em var(--caps);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.body strong, .body b { color: var(--accent); }
.body em { font-style: italic; }
.body mark { background: var(--wash); color: inherit; padding: 0 0.15em; }

.tag {
  font-size: 0.85em;
  color: var(--accent);
  opacity: 0.8;
}

/* headings inside a note, kept small: this is a notebook, not an essay */
.body h1, .body h2, .body h3, .body h4, .body h5, .body h6 {
  margin: 1.2em 0 0.4em;
  font: 600 0.74rem/1.3 var(--caps);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.body ul, .body ol { margin: 0 0 0.8em; padding-left: 1.2em; }
.body li { margin: 0.15em 0; }
.body li::marker { color: var(--quiet); }

.body blockquote {
  margin: 0.2em 0 0.9em;
  padding: 0.05em 0 0.05em 1rem;
  border-left: 1px solid var(--hairline);
  font-size: 12.6px;                /* fixed, so it stays put if the body size changes */
  font-style: italic;
  color: #666;
}
.body blockquote p { margin: 0 0 0.4em; text-align: left; }
.body blockquote p:last-child { margin-bottom: 0; }

/* images sit plainly in the column, unframed */
.body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.35em 0 0.9em;
}

.body code {
  font-size: 0.85em;
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 0.05em 0.3em;
}
.body pre {
  overflow-x: auto;
  background: var(--wash);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 0.7em 0.9em;
  line-height: 1.5;
}
.body pre code { background: none; border: 0; padding: 0; }

.body hr { border: 0; border-top: 1px solid var(--hairline); margin: 1.2em 0; }

.empty, .back {
  font-style: italic;
  color: var(--quiet);
  padding: 1.5rem 0;
}
.back { padding-top: 1rem; }

/* "All notes" (and the 404 page's link) set like ABYSSATA beneath the name */
.back a, .empty a {
  font: 600 0.72rem var(--caps);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── A status (status: true), centred ── */
.status .body { text-align: center; }
.status .body p { margin: 0; text-align: center; }
/* first line: ABYSSATA IS READING, in small oxblood capitals, between two grey lines */
.status .status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 0.72rem/1.4 var(--caps);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.status .status-line::before, .status .status-line::after {
  content: "";
  flex: 0 0 3.5rem;
  border-top: 1px solid #d6d6d6;
}
.status .status-line::before { margin-right: 0.9em; }
.status .status-line::after { margin-left: 0.9em; }
.status .status-line strong, .status .status-line em { color: inherit; font: inherit; }
/* the rest beneath it, in italics */
.status .status-more { margin-top: 0.4rem; font-style: italic; }
.status .status-more em { font-style: normal; }
.status .status-more > * { margin: 0 0 0.4em; }
.status .status-more > :last-child { margin-bottom: 0; }

/* a note on its own page: ALL NOTES just beneath it */
.single .day { margin-bottom: 0; }
.single .back { padding: 0.75rem 0 0; }

/* ── The foot: search on the left, older and newer on the right ── */
footer {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}
.foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

/* the search line, as in the garden: an italic "search", a single line beneath */
.search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 12rem;
  max-width: 60%;
  padding: 0 0 0.1rem;
  border-bottom: 1px solid #d0d0d0;
  transition: border-color 0.15s ease;
}
.search:hover, .search:focus-within { border-bottom-color: #444; }
.search input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  font: italic 0.9rem/1.15 var(--spectral);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--quiet); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search svg { width: 13px; height: 13px; flex: none; }
.search svg path { stroke: var(--quiet); }

/* NEWER and OLDER, set like ABYSSATA */
.pager { display: flex; gap: 1.1rem; white-space: nowrap; }
.pager a {
  font: 600 0.72rem var(--caps);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* search results */
.found { margin: 0 0 1.4rem; font: italic 0.85rem/1.4 var(--spectral); color: var(--quiet); }
.body mark.hit { background: #f1e7e8; padding: 0; }

@media (max-width: 600px) {
  .masthead { padding-top: 2.5rem; padding-bottom: 2.25rem; }
}
