/* The look of every brevier.org page: "the title page" (style C), in the
   Brevier apps' colours and type. Colour values are copied from the apps'
   app.css (agent-app/src/app.css; server-app/src/app.css is a copy of it). */

@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/spectral-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/spectral-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/spectral-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/courier-prime-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/courier-prime-700.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #f3ecd9;
  --border: #c2b389;
  --fg: #241d12;
  --fg-muted: #4a4030;
  --accent: #6b4674;
  --accent-fg: #f3ede0;
  --chrome: #221a10;
  --chrome-fg: #efe6cf;
  --font-serif: 'Spectral', Georgia, Cambria, 'Times New Roman', serif;
  --font-mono: 'Courier Prime', 'Courier New', ui-monospace, monospace;
  --gutter: 40px;
  --band-edge: transparent;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1710;
    --border: #3e3424;
    --fg: #ece1c9;
    --fg-muted: #ad9f86;
    --accent: #a87fae;
    --accent-fg: #211a12;
    --chrome: #16110a;
    --chrome-fg: #ece1c9;
    /* The band and the page are both dark here, so a rule marks where the band ends. */
    --band-edge: #3e3424;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font-serif);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

li {
  margin: 0 0 8px;
}

/* The leaf from the app icon, drawn in the colour of the text around it. */
.leaf {
  display: block;
  flex: none;
  background: currentColor;
  -webkit-mask: url('/leaf.svg') center / contain no-repeat;
  mask: url('/leaf.svg') center / contain no-repeat;
}

/* The dark band: the app icon's stock with the cream leaf. */
.title-band {
  background: var(--chrome);
  color: var(--chrome-fg);
  text-align: center;
  padding: 26px var(--gutter) 56px;
  border-bottom: 1px solid var(--band-edge);
}

.title-band a {
  color: inherit;
}

.title-band .top-links {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 56px;
}

.title-band .top-links.with-name {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.nav-link {
  font: 700 12px/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 16px var(--font-serif);
  letter-spacing: 0.24em;
  text-decoration: none;
}

.wordmark .leaf {
  width: 22px;
  height: 22px;
}

.title-band .big-leaf {
  width: 124px;
  height: 124px;
  margin: 0 auto;
}

.title-band .name {
  font: 400 36px/1.2 var(--font-serif);
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  margin: 30px 0 26px;
}

.title-band .rule {
  width: 64px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  margin: 0 auto 26px;
  border: 0;
}

.title-band p {
  font-size: 22px;
  line-height: 1.5;
  max-width: 27em;
  margin: 0 auto 10px;
  opacity: 0.92;
}

.title-band .invitation {
  font: 400 22px/1.5 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 52px;
}

.title-band .eyebrow {
  font: 400 22px/1.4 var(--font-mono);
  letter-spacing: 0.2em;
  opacity: 0.7;
  margin-bottom: 10px;
}

/* A page that is only the band, such as the 404 page. */
.title-band.whole-page {
  min-height: 100vh;
}

.title-band h1.title {
  font: 600 38px/1.2 var(--font-serif);
  margin: 0 0 14px;
}

/* The centred column of numbered parts. */
.column {
  max-width: calc(540px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 30px var(--gutter) 20px;
}

.column h2 {
  text-align: center;
  font: 600 26px/1.3 var(--font-serif);
  margin: 0 0 16px;
}

.column h2 .aside {
  display: block;
  font-size: 17px;
  font-weight: 400;
  color: var(--fg-muted);
  margin-top: 2px;
}

.part-number {
  text-align: center;
  font: 400 12px/1.4 var(--font-mono);
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  margin: 0 0 6px;
}

.column .leaf.between {
  width: 18px;
  height: 18px;
  color: var(--border);
  margin: 34px auto;
}

.centred {
  text-align: center;
}

.button {
  display: inline-flex;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 1px;
  background: var(--accent);
  color: var(--accent-fg);
  font: 700 13px var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  margin: 6px 0 12px;
}

.small {
  font-size: 14px;
  color: var(--fg-muted);
}

/* The colophon at the foot of the page. */
.colophon {
  text-align: center;
  padding: 24px var(--gutter) 44px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--fg-muted);
}

.colophon p {
  margin: 0 0 4px;
}

@media (max-width: 600px) {
  .title-band {
    padding: 18px var(--gutter) 40px;
  }
  .title-band .top-links {
    margin-bottom: 30px;
  }
  .title-band .name {
    font-size: 28px;
  }
  .title-band p {
    font-size: 18px;
  }
  .title-band .invitation {
    font-size: 18px;
    margin-top: 36px;
  }
  .title-band .eyebrow {
    font-size: 18px;
  }
  .title-band h1.title {
    font-size: 30px;
  }
  .column {
    padding-top: 20px;
  }
  .column h2 {
    font-size: 23px;
  }
}
