/* TypeCafe with Suhalia's narrow navigation rail. The browser's default
   serif remains the identifying type; the rail changes the page's geography,
   not its typographic language. */

* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
}

body {
  font-size: 12pt;
  margin: 0;
}

.site {
  display: grid;
  grid-template-columns: 190px minmax(0, 800px);
  min-height: 100vh;
}

/* #f1f1eb is a quiet warm field, not a general-purpose panel colour. It gives
   the persistent navigation a stable place while the portrait supplies the
   site's actual colour. The single hairline is enough to separate the rail
   from the document. */
.site-rail {
  align-items: flex-start;
  background: #f1f1eb;
  border-right: 1px solid #b0b0ab;
  display: flex;
  flex-direction: column;
  padding: 38px 28px;
}

.rail-copy {
  display: contents;
}

.site-portrait {
  display: block;
  height: 165px;
  margin: 0 0 18px;
  object-fit: contain;
  width: 112px;
}

.portrait-link {
  display: block;
  order: 1;
}

.site-name {
  display: block;
  font-size: 1.75em;
  font-weight: bold;
  margin: 0 0 22px;
  order: 2;
}

.site-nav {
  order: 3;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  margin: 0 0 0.65em;
}

.site-main {
  max-width: 800px;
  padding: 48px 52px 72px;
}

/* Gallery pages earn a wider content column. The prose within them keeps its
   own measure in the page-specific stylesheet. */
.gallery-page .site {
  grid-template-columns: 190px minmax(0, 1fr);
}

.gallery-page .site-main {
  max-width: none;
}

.gallery-page .record-body {
  max-width: 1100px;
}

/* Record pages share one page-wide band at a fixed height. The compact left
   cell holds a record number when the page has one; Home leaves it empty. */
.record-page .site-main {
  max-width: none;
  padding: 0 0 72px;
}

.record-page .site {
  grid-template-columns: 190px minmax(0, 1fr);
}

.record-header {
  border-bottom: 1px solid #b0b0ab;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  height: 81px;
}

.record-mark {
  align-items: center;
  background: #f1f1eb;
  display: flex;
  font-size: 0.78em;
  letter-spacing: 0.045em;
  line-height: 1.35;
  padding: 17px 18px;
}

.record-title {
  padding: 17px 22px 15px;
}

.record-title h1 {
  font-size: 1.38em;
  line-height: 1.12;
  margin: 0;
}

.record-meta {
  font-size: 0.82em;
  margin: 8px 0 0;
}

.record-body {
  padding: 38px 52px 0;
}

.record-page:not(.gallery-page) .record-body {
  max-width: 800px;
}

h1 {
  font-size: 1.75em;
  margin: 0 0 0.4em;
}

h2 {
  font-size: 1.22em;
  margin: 1.5em 0 0.35em;
}

h3 {
  font-size: 1.06em;
  margin: 1.3em 0 0.3em;
}

h4 {
  font-size: 1em;
  margin: 1.3em 0 0.3em;
}

@media (max-width: 560px) {
  .site {
    display: block;
  }

  .site-rail {
    align-items: start;
    border-bottom: 1px solid #b0b0ab;
    border-right: 0;
    display: grid;
    gap: 0 18px;
    grid-template-columns: 78px 1fr;
    padding: 20px;
  }

  .rail-copy {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }

  .site-portrait {
    height: 115px;
    margin: 0;
    width: 78px;
  }

  .portrait-link {
    grid-column: 1;
    grid-row: 1;
    order: initial;
  }

  .site-name {
    margin-bottom: 12px;
  }

  .site-nav li {
    margin-bottom: 0.35em;
  }

  .site-main {
    padding: 30px 20px 56px;
  }

  .record-page .site-main {
    padding: 0 0 56px;
  }

  .record-header {
    grid-template-columns: 78px minmax(0, 1fr);
    height: 94px;
  }

  .record-mark {
    font-size: 0.72em;
    padding: 14px 10px;
  }

  .record-title {
    padding: 14px 16px 13px;
  }

  .record-title h1 {
    font-size: 1.18em;
  }

  .record-meta {
    font-size: 0.78em;
    margin-top: 6px;
  }

  .record-body {
    padding: 30px 20px 0;
  }
}
