@font-face {
  font-family: "Jannon Sans";
  src: url("/fonts/JannonSansText.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jannon Sans";
  src: url("/fonts/JannonSansText-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Jannon Sans";
  src: url("/fonts/JannonSansText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jannon Sans";
  src: url("/fonts/JannonSansText-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #F4F4F2;
  --ink: #14213D;
  --accent: #B04A23;
  --muted: #5E6B4E;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --bg: #14213D;
    --ink: #DCDCD6;
    --accent: #DA7248;
    --muted: #7C8466;
  }
}

:root[data-mode="dark"] {
  --bg: #14213D;
  --ink: #DCDCD6;
  --accent: #DA7248;
  --muted: #7C8466;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Jannon Sans", system-ui;
  font-size: clamp(19px, 17px + 0.6vw, 22px);
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums;
  font-variant-ligatures: common-ligatures discretionary-ligatures;
}

.column {
  max-width: 32em;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 3.5rem;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
  position: relative;
  padding-bottom: 1.15rem;
  border-bottom: 0;
}

.masthead::after,
footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border: 0;
  background: linear-gradient(to right, transparent, var(--muted) 20%, var(--muted) 80%, transparent);
  opacity: 0.5;
}

.masthead::after {
  bottom: 0;
}

.masthead > a {
  display: block;
  line-height: 0;
  color: inherit;
  text-decoration: none;
}

.masthead > a:hover,
.masthead > a:visited {
  color: inherit;
  text-decoration: none;
}

.logo {
  display: block;
  height: 68px;
  aspect-ratio: 1702 / 1844;
  background-color: var(--accent);
  -webkit-mask: url("/images/griffin.svg") center / contain no-repeat;
  mask: url("/images/griffin.svg") center / contain no-repeat;
}

.masthead > a:hover .logo,
.masthead > a:focus-visible .logo {
  background-color: var(--ink);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.15rem;
}

nav a {
  color: var(--muted);
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 400;
  font-variant-caps: all-small-caps;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.mode-switch {
  align-self: center;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font-family: "Apple Symbols", "Segoe UI Symbol", "DejaVu Sans", sans-serif;
  font-size: 1.1em;
  line-height: 1;
}

.mode-switch:hover,
.mode-switch:focus-visible {
  color: var(--accent);
}

.mode-switch .ms-light {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) .mode-switch .ms-dark {
    display: none;
  }

  :root:not([data-mode="light"]) .mode-switch .ms-light {
    display: inline;
  }
}

:root[data-mode="dark"] .mode-switch .ms-dark {
  display: none;
}

:root[data-mode="dark"] .mode-switch .ms-light {
  display: inline;
}

:root[data-mode="light"] .mode-switch .ms-dark {
  display: inline;
}

:root[data-mode="light"] .mode-switch .ms-light {
  display: none;
}

.kicker {
  margin: 2.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 400;
  font-variant-caps: all-small-caps;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.06em;
}

h1 {
  margin: 0.85rem 0 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: normal;
  line-height: 1.2;
}

h2 {
  margin: 2em 0 0.4em;
  color: var(--ink);
  font-size: 1.15em;
  font-weight: 400;
  font-style: normal;
  font-variant-caps: small-caps;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.05em;
}

h3 {
  margin: 1.6em 0 0.3em;
  color: var(--ink);
  font-size: 1em;
  font-weight: 400;
  font-style: italic;
}

main h2 + p {
  margin-top: 0;
}

.subtitle {
  margin: 0.9rem 0 0;
  color: var(--ink);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
}

main > :first-child {
  margin-top: 3rem;
}

main p {
  margin: 1.2rem 0 0;
}

h1 + .subtitle {
  margin-top: 0.85rem;
}

.subtitle + p {
  margin-top: 1.85rem;
}

main pre {
  margin: 1.2rem 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85em;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  padding: 0.8rem 1rem;
  overflow-x: auto;
}

em,
cite {
  font-style: italic;
  font-weight: 400;
}

blockquote {
  margin: 2.6rem 0 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: 1.45rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
}

blockquote p {
  margin: 0;
}

.caption {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 400;
  font-variant-caps: all-small-caps;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.06em;
}

.toc { list-style: none; margin: 2rem 0 0; padding: 0; }
.toc li { display: flex; align-items: baseline; margin: 0 0 0.6em; }
.toc a { flex: 0 1 auto; white-space: nowrap; }
.toc .leader { flex: 1 1 auto; min-width: 2em; margin: 0 0.4em; overflow: hidden; white-space: nowrap; color: var(--muted); }
.toc .leader::before { content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."; }
.toc time { flex: 0 0 auto; color: var(--muted); font-variant-numeric: oldstyle-nums; white-space: nowrap; }

.tools {
  list-style: none;
  margin: 1.85rem 0 0;
  padding: 0;
}

.tools,
.tools li {
  list-style: none;
}

.tools ::marker {
  content: none;
}

.tools li {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin: 0;
  padding: 1.4rem 0;
  border-top: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
}

.tools li:first-child {
  border-top: 0;
}

.tools li > div {
  flex: 1 1 auto;
  min-width: 0;
}

.tools img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.tools h2,
.tools h2 + p {
  margin: 0;
}

.tools h2 {
  font-variant-caps: normal;
}

.tool-links {
  margin-top: 0.45rem;
  font-size: 0.9em;
}

.tool-links a {
  color: var(--accent);
}

p.note {
  color: var(--muted);
  font-size: 0.9em;
}

@media (max-width: 480px) {
  .tools img {
    width: 40px;
    height: 40px;
  }
}

.fin { margin: 2.5rem 0 0; text-align: center; color: var(--accent); font-family: "Apple Symbols", "Segoe UI Symbol", "DejaVu Sans", serif; font-size: 1.4em; line-height: 1; }
.fin a, .fin a:visited, .fin a:hover { display: inline-block; line-height: 0; text-decoration: none; }
.fleuron {
  display: inline-block;
  width: 1em;
  height: 1.03em;
  background-color: var(--accent);
  -webkit-mask: url("/images/fleuron.svg") center / contain no-repeat;
  mask: url("/images/fleuron.svg") center / contain no-repeat;
  transition: background-color 0.3s ease;
}
.fin a:hover .fleuron,
.fin a:focus-visible .fleuron {
  background-color: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  position: relative;
  margin-top: 3.25rem;
  padding-top: 1.2rem;
  border-top: 0;
}

footer::before {
  top: 0;
}

.label {
  color: var(--muted);
  font-size: 1em;
  font-style: normal;
  font-weight: 400;
  font-variant-caps: small-caps;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.04em;
}

address {
  font-style: normal;
  line-height: 1.6;
}

.mark {
  margin: 0.15rem 0 0 auto;
  color: var(--muted);
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  font-variant-caps: all-small-caps;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}

.mark:visited {
  color: var(--muted);
  text-decoration: none;
}

.mark:hover,
.mark:focus-visible,
.mark:visited:hover {
  color: var(--accent);
  text-decoration: none;
}

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

a:visited {
  color: var(--accent);
}

nav a:visited {
  color: var(--muted);
}

nav a:hover,
nav a:focus-visible,
nav a:visited:hover {
  color: var(--accent);
}

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

main a {
  text-decoration: none;
}

main a:hover {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a[target="_blank"]::after {
  content: "\2197";
  content: "\2197" / " (opens in a new tab)";
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.1em;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  text-indent: 0;
}
a.no-arrow::after { content: none; }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 0.28em;
}

@media (min-width: 48rem) {
  .column {
    padding: 4.25rem 1.5rem 5rem;
  }

  .logo {
    height: 88px;
  }
}

@media (max-width: 28rem) {
  footer {
    flex-wrap: wrap;
  }
}

.logo,
nav a,
.mode-switch,
main a,
.mark {
  transition: color 0.3s ease, background-color 0.3s ease, text-decoration-color 0.3s ease;
}

.pie-stage {
  height: 300vh;
  overflow-x: clip;
}

.pie-stick {
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  padding-top: 1.2rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

p.pie {
  margin: 0;
}

.pie .w {
  display: inline-block;
  white-space: nowrap;
}

.pie .l {
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  .logo, nav a, .mode-switch, main a, .mark { transition: none; }

  .pie-stage {
    height: auto;
  }

  .pie-stick {
    position: static;
    height: auto;
    display: block;
  }
}

.portrait {
  float: right;
  width: 180px;
  height: auto;
  margin: 0.35rem 0 1rem 1.5rem;
  border-radius: 11px;
}

@media (max-width: 28rem) {
  .portrait {
    float: none;
    display: block;
    margin: 0.5rem auto 1.25rem;
  }
}

.plate {
  margin: 2rem auto;
  text-align: center;
}

.plate img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 11px;
}

.plate figcaption {
  max-width: 28rem;
  margin: 0.75rem auto 0;
  font-size: 0.85em;
  line-height: 1.5;
  color: var(--muted);
}

.portrait,
.plate img {
  box-sizing: border-box;
  border: 1px solid var(--muted);
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
}

.plate.wide img {
  width: 600px;
}

.reading {
  list-style: none;
  padding-left: 0;
}

.reading li {
  margin: 0 0 0.6em;
  padding-left: 1.2em;
  text-indent: -1.2em;
}

/* Fallen 404 sorts on the error page */
.sorts {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
  margin: 1.75rem 0 0 auto;
  color: var(--muted);
  opacity: 0.85;
}

@media (max-width: 28rem) {
  .sorts {
    width: 110px;
  }
}
