/* Colours from app/src/reader/theme.ts (DESIGN.md). */
:root {
  --void: #150a14;
  --card: #2b1426;
  --card-edge: #4a2440;
  --amber: #f0a53a;
  --paper: #f6e7d0;
  --paper-dim: #d3bfa4;
  --ink: #1a1216;
  --plum: #5b1f3a;
}

@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/young-serif-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/young-serif-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: italic;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/nunito-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: italic;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/nunito-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--paper);
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 44rem;
}

.site-header {
  padding: 32px 4px 20px;
}

.brand {
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.75rem;
  color: var(--paper);
  text-decoration: none;
}

/* The programme card: every line the reader must read sits on it, opaque, lit from below. */
main {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  padding: 28px 22px 32px;
  box-shadow: 0 18px 40px -24px rgba(240, 165, 58, 0.18), 6px 10px 24px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
  main {
    padding: 44px 48px 48px;
  }
}

h1,
h2,
h3 {
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  color: var(--paper);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.8rem + 2vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 44px 0 10px;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 28px 0 6px;
}

p,
ul,
ol,
table {
  margin: 0 0 14px;
  max-width: 68ch;
}

ul,
ol {
  padding-left: 1.25em;
}

li + li {
  margin-top: 6px;
}

strong {
  font-weight: 800;
}

.updated {
  color: var(--paper-dim);
  font-size: 0.9375rem;
  margin-bottom: 28px;
}

.lead {
  font-size: 1.1875rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--card-edge);
}

th {
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 14px;
}

.table-scroll table {
  margin: 0;
}

h1 + .lead {
  margin-top: 16px;
}

.contact {
  font-weight: 800;
  font-size: 1.125rem;
}

.page-list {
  list-style: none;
  padding: 0;
  margin-top: 24px;
}

.page-list li + li {
  margin-top: 0;
}

.page-list a {
  display: flex;
  min-height: 44px;
  align-items: center;
  border-top: 1px solid var(--card-edge);
  font-weight: 800;
  text-decoration: none;
}

.page-list li:last-child a {
  border-bottom: 1px solid var(--card-edge);
}

.page-list a:hover {
  color: var(--paper);
}

.site-footer {
  padding: 28px 4px 40px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  max-width: none;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--paper-dim);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--amber);
}
