@charset "utf-8";

/* ==========================================================================
   Congrave Press — congravepress.com
   Single hand-written stylesheet. No framework.
   Structure kept from the 2011 original (black rules top and bottom, one
   centred column, floated book cover); typography and link treatment reworked.
   ========================================================================== */

/* ---------- Type system --------------------------------------------------
   Two families only:
     --font-text  reading and headings
     --font-ui    navigation, labels, small print
   Swap these two lines to change the whole site's voice.
   ------------------------------------------------------------------------ */

:root {
  --font-text: Verdana, Arial, Helvetica, sans-serif;
  --font-ui: Verdana, Arial, Helvetica, sans-serif;
 /* --font-text: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */

  /* Type scale — 1.25 ratio off a 1.0625rem base */
  --t-xs: 0.78rem;
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.25rem;
  --t-lg: 1.5rem;
  --t-xl: clamp(1.5rem, 1.1rem + 2vw, 2.125rem);
  --t-display: clamp(1.9rem, 1.2rem + 3.4vw, 2.75rem);

  /* Ink */
  --ink: #16130f;
  --ink-soft: #5a534a;
  --paper: #fffdf9;
  --bar: #14110e;
  --bar-text: #f6f1e8;
  --rule: #14110e;
  --rule-soft: #ddd5c7;
  --link: #7a2b16;          /* oxblood — reads as near-black at heading sizes */
  --link-hover: #a8391d;
  --focus: #7a2b16;

  --measure: 940px;         /* container — wide enough for a cover plus a real measure */
  --prose: 34rem;           /* ~64 characters of body text */
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Skip link ---------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bar);
  color: var(--bar-text);
  padding: 0.6em 1em;
  z-index: 10;
  font-family: var(--font-ui);
}
.skip-link:focus { left: 0; }

/* ---------- Layout ------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
}

.content { padding: 0 var(--gutter) 1rem; }

/* ---------- Header / footer bars ----------------------------------------- */

.bar {
  display: block;
  background: var(--bar);
  color: var(--bar-text);
  border-top: solid 2px var(--rule);
  border-bottom: double 3px var(--paper);
  background-image: linear-gradient(
    to bottom,
    var(--paper) 0, var(--paper) 1px,
    var(--bar) 1px, var(--bar) 2px,
    var(--paper) 2px, var(--paper) 3px,
    transparent 3px
  );
  background-repeat: repeat-x;
  background-position: top;
}

.site-header {
  padding: 1.6rem var(--gutter) 1.8rem;
  margin-top: 1rem;
}
.site-header a { color: inherit; text-decoration: none; }
.site-header a:hover,
.site-header a:focus-visible { text-decoration: none; }

.site-header .wordmark {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--t-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  word-spacing: 0.12em;
}
.site-header .place {
  margin: 0.5em 0 0;
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  color: #c6bcab;
}

.site-footer {
  margin-top: 3.5rem;
  padding: 1.4rem var(--gutter);
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  line-height: 1.7;
  color: #b9b0a1;
}
.site-footer p { margin: 0.15em 0; }
.site-footer a { color: #e6ddcd; text-decoration: underline; text-underline-offset: 0.15em; }
.site-footer a:hover { color: #fff; }

/* ---------- Navigation --------------------------------------------------- */

.site-nav {
  padding: 0.7rem var(--gutter);
  border-bottom: solid 1px var(--rule-soft);
  font-family: var(--font-ui);
  font-size: var(--t-sm);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.6rem;
}
.site-nav a {
  display: inline-block;
  padding: 0.3em 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--ink); border-bottom-color: var(--rule-soft); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
  cursor: default;
}

/* ---------- Headings ------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-text);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}

.page-title {
  margin: 1.9rem 0 1.2rem;
  font-size: var(--t-xl);
  max-width: 22em;
  text-wrap: balance;
}
.page-title small {
  display: block;
  margin-top: 0.5em;
  font-size: 0.55em;
  font-weight: 400;
  font-style: normal;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.content h2 { font-size: var(--t-lg); margin-top: 2.2em; }
.content h3 { font-size: var(--t-md); }

/* Small-caps section label. A real heading level, styled down — so the
   document outline stays correct without shouting on the page. */
.label, .also h2 {
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.content h2.label { font-size: var(--t-xs); margin-top: 2.4em; }

/* ---------- Body text ----------------------------------------------------- */

p { margin: 0 0 1.05em; max-width: var(--prose); }
.content li { max-width: var(--prose); }

/* ---------- Links ---------------------------------------------------------
   Prose links are coloured and underlined. Links that ARE a title — the
   byline, the publication lists, "By the same author" — stay black and use
   the underline alone, so the title reads as a title, not as a control.
   ------------------------------------------------------------------------ */

a {
  color: var(--link);
  text-decoration: none;
  /* text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); */
}
a:hover {
  color: var(--link-hover);
  /* text-decoration-color: currentColor; */
}

/* Titles that happen to be links */
h1 a, h2 a, h3 a,
.byline a,
.pubs .t,
.also .t,
.cta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule-soft);
}
h1 a:hover, h2 a:hover, h3 a:hover,
.byline a:hover,
.pubs .t:hover,
.also .t:hover,
.cta a:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

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

hr {
  border: 0;
  border-top: solid 1px var(--rule-soft);
  width: 100%;
  max-width: var(--prose);
  margin: 2.5rem 0;
}

blockquote {
  margin: 0 0 1em;
  padding-left: 1.5rem;
  border-left: 2px solid var(--rule-soft);
}

em, cite, i { font-style: italic; }

/* ---------- Book pages ---------------------------------------------------- */

/* Two columns at wide widths: cover left, text right. A grid rather than the
   original float, so the text column has one predictable measure instead of
   narrowing beside the cover and then jumping to full width below it. */
.book .cover { margin: 0 0 1.75rem; max-width: none; }

.book-cover {
  display: block;
  margin: 0 auto;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.14);
}

@media (min-width: 50em) {
  .book {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    column-gap: 2.5rem;
    align-items: start;
  }
  .book > * { grid-column: 2; max-width: none; }
  .book > .cover {
    grid-column: 1;
    grid-row: 1 / span 99;
    margin-bottom: 0;
  }
  .book p, .book li { max-width: none; }
}

.byline {
  font-size: var(--t-md);
  font-style: italic;
  margin-bottom: 1em;
}

/* Book details as a description list: label / value pairs, not a run of <br>. */
dl.meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.15rem 1rem;
  margin: 0 0 2em;
  max-width: var(--prose);
  font-family: var(--font-ui);
  font-size: var(--t-sm);
  line-height: 1.55;
}
dl.meta dt {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.25em;
}
dl.meta dd { margin: 0; color: var(--ink); }

@media (max-width: 26em) {
  dl.meta { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dl.meta dt { padding-top: 0.8em; }
}

.review {
  margin: 0 0 1.75em;
  max-width: var(--prose);
}
.review blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  quotes: "\201C" "\201D" "\2018" "\2019";
}
.review blockquote p { margin: 0; }
.review blockquote p::before { content: open-quote; }
.review blockquote p::after { content: close-quote; }
.review figcaption {
  margin-top: 0.45em;
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.review figcaption cite { font-style: normal; }
.review figcaption cite em { font-style: italic; }

.cta {
  margin: 2.75rem 0 1.5rem;
  max-width: none;
  font-size: var(--t-md);
}

/* ---------- Publications list --------------------------------------------- */

.pubs {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  max-width: var(--prose);
}
.pubs li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-top: solid 1px var(--rule-soft);
}
.pubs li:first-child { border-top: 0; padding-top: 0.4rem; }
.pubs img {
  flex: 0 0 auto;
  width: 65px;
  height: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.pubs .pub-body { flex: 1 1 auto; }
.pubs p { margin: 0 0 0.3em; max-width: none; }
.pubs .t { font-style: italic; }
.pubs .note,
.pubs .order {
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-style: normal;
}
.pubs .note { color: var(--ink-soft); }
.pubs .order { margin-top: 0.45em; }
.pubs .order a { text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); }

/* ---------- "By the same author" ------------------------------------------ */

.also {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: solid 2px var(--rule);
  /* the thumbnail column is extra, so the text column keeps the prose measure */
  max-width: calc(var(--prose) + 65px + 1.25rem);
}
.also h2 { margin: 0 0 0.4em; }
.also ul { list-style: none; margin: 0; padding: 0; }
.also li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-top: solid 1px var(--rule-soft);
  padding: 1.05rem 0;
}
.also li:first-child { border-top: 0; }
.also .thumb {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
  text-decoration: none;
}
.also .thumb img {
  width: 65px;
  height: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.also-body { flex: 1 1 auto; min-width: 0; }
.also .t {
  display: block;
  font-style: italic;
  font-size: var(--t-base);
  line-height: 1.35;
}
.also .pub {
  display: block;
  margin-top: 0.35em;
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  line-height: 1.55;
  color: var(--ink-soft);
}
.also .pub a { color: var(--ink-soft); }
.also .pub a:hover { color: var(--link); }

/* ---------- Article page --------------------------------------------------- */

.figure {
  margin: 0 0 2.5rem;
  max-width: none;
}
.figure img {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.figure figcaption {
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 0.75rem;
  max-width: var(--prose);
}

.article-lead p { font-size: 1.08em; }

.footnotes {
  border-top: solid 1px var(--rule-soft);
  padding-top: 1.25rem;
  margin-top: 2.5rem;
  max-width: var(--prose);
}
.footnotes h2 { margin-bottom: 0.8em; }
.footnotes ol {
  margin: 0;
  padding-left: 1.5em;
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  line-height: 1.65;
  color: var(--ink-soft);
}
.footnotes li { margin-bottom: 0.7em; max-width: none; }
.footnotes li a { color: var(--ink-soft); }
sup a { text-decoration: none; }

.signoff {
  margin: 1.75rem 0 0;
  font-style: italic;
}

.backlink {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: solid 1px var(--rule-soft);
  font-family: var(--font-ui);
  font-size: var(--t-sm);
}

/* ---------- Utilities ------------------------------------------------------ */

.center { text-align: center; }
h2.center { max-width: var(--prose); }
.note { color: var(--ink-soft); }

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

@media print {
  .site-nav, .skip-link, .also { display: none; }
  body { font-size: 11pt; background: #fff; }
  .bar { background: none; color: #000; border-bottom: 1px solid #000; }
  .book-cover, .pubs img, .figure img { box-shadow: none; }
  a { color: #000; }
}
