/* Fonts hosted with the site so pages render without waiting on Google Fonts */
@font-face { font-family: "Hind"; font-weight: 400; font-style: normal; font-display: block; src: url(fonts/hind-400.woff2) format("woff2"); }
@font-face { font-family: "Hind"; font-weight: 600; font-style: normal; font-display: block; src: url(fonts/hind-600.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400 500; font-style: normal; font-display: block; src: url(fonts/jost.woff2) format("woff2"); }

/* Cross-fades between pages instead of a blank redraw, in browsers that support it */
@view-transition { navigation: auto; }

/* Colours and fonts from the checqr.net theme */
:root {
  --text: #000000;
  --text-alt: #333333;
  --main-blue: #161c2e;
  --secondary-blue: #415898;
  --primary: #0B51C2;
  --tint: #F9FAFE;
  --border: #e3e6ef;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hind", sans-serif;
  font-size: 1.05rem;
  color: var(--text-alt);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Jost", sans-serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}

h1 { font-size: 2.6rem; letter-spacing: -0.02em; margin: 0 0 24px; }
h2 { font-size: 1.8rem; margin: 40px 0 16px; }
h3 { font-size: 1.4rem; margin: 32px 0 12px; }
h4 { font-size: 1.15rem; font-weight: 500; margin: 24px 0 8px; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-title { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.site-title img { height: 40px; width: auto; }
.site-title span {
  font-family: "Jost", sans-serif;
  font-size: 1.1rem;
  color: var(--main-blue);
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--border);
}

.language { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--text-alt); }
.language select {
  font: inherit;
  color: #ffffff;
  background: var(--main-blue);
  border: 0;
  border-radius: 4px;
  padding: 6px 10px;
}

.layout { display: flex; max-width: 1280px; margin: 0 auto; }

nav {
  flex: 0 0 260px;
  padding: 32px 24px;
  background: var(--tint);
  min-height: calc(100vh - 73px);
}

nav h2 {
  font-family: "Hind", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary-blue);
  margin: 0 0 12px;
}
nav ul { list-style: none; margin: 0; padding: 0; }
nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--main-blue);
  text-decoration: none;
}
nav a:hover { background: #ffffff; }
nav a.current { background: var(--main-blue); color: #ffffff; }

main { flex: 1; min-width: 0; padding: 40px 56px 64px; max-width: 900px; }
main img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; margin: 8px 0; }
main a { color: var(--primary); }
main table { border-collapse: collapse; }
main th, main td { border: 1px solid var(--border); padding: 6px 10px; text-align: start; }
main th { background: var(--tint); }
main pre { background: var(--tint); padding: 12px; overflow-x: auto; }

@media (max-width: 760px) {
  header { padding: 12px 16px; flex-wrap: wrap; }
  .site-title img { height: 32px; }
  .layout { flex-direction: column; }
  nav { min-height: 0; padding: 16px; }
  main { padding: 24px 16px 48px; }
  h1 { font-size: 2rem; }
}
