/* charcoal and chalk, nothing else: the light theme is chalk paper with charcoal lines, the dark one the other way round */
:root {
  --charcoal: #1c1b19; --chalk: #f3f0e8;
  --bg: var(--chalk); --ink: var(--charcoal); --paper: var(--bg);
  --soft: color-mix(in srgb, var(--ink) 58%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --wash: color-mix(in srgb, var(--ink) 4%, transparent);
  --wash2: color-mix(in srgb, var(--ink) 8%, transparent);
  --sans: 'Manrope', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] { --bg: var(--charcoal); --ink: var(--chalk); color-scheme: dark }
html { background: var(--bg) }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; accent-color: var(--ink) }
a { color: inherit }
::selection { background: var(--ink); color: var(--bg) }

.top { display: flex; align-items: center; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line) }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -.02em }
/* the hand-drawn wordmark, as a mask so it takes the ink colour in light and dark */
.brand .logo { display: block; width: 136px; aspect-ratio: 1387.1 / 203.8; background: currentColor; -webkit-mask: url(/site/mushlove.svg) center / contain no-repeat; mask: url(/site/mushlove.svg) center / contain no-repeat }
.brand:hover .logo { opacity: .8 }
.top nav { display: flex; gap: 2px; flex-wrap: wrap }
.top nav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 999px; color: var(--soft); transition: color .15s, background .15s }
.top nav a:hover { color: var(--ink); background: var(--wash) }
.top nav a[aria-current] { color: var(--ink); background: var(--wash2) }
.mode { margin-left: auto; display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px }
.mode button { display: grid; place-items: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--soft); cursor: pointer; transition: background .15s, color .15s }
.mode button:hover { color: var(--ink) }
.mode svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
:root[data-mode="light"] .mode [data-mode-pick="light"], :root[data-mode="dark"] .mode [data-mode-pick="dark"], :root[data-mode="system"] .mode [data-mode-pick="system"] { background: var(--ink); color: var(--bg) }
.top .menu { display: none }
/* a phone: the wordmark, the theme switch and a menu button; the pages drop down under the bar when it's opened */
@media (max-width: 640px) {
  .top { position: relative; z-index: 30; padding: 10px 16px; gap: 8px }
  .brand .logo { width: 118px }
  .mode button { width: 30px; height: 28px }
  .top .menu { display: grid; place-items: center; width: 38px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent }
  .top .menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; overflow: visible }
  .top .menu path { transition: transform .2s ease, opacity .15s; transform-origin: 12px 12px }
  .top.open .menu { background: var(--ink); color: var(--bg); border-color: var(--ink) }
  .top.open .menu .a { transform: translateY(5px) rotate(45deg) }
  .top.open .menu .b { opacity: 0 }
  .top.open .menu .c { transform: translateY(-5px) rotate(-45deg) }
  .top nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 8px 12px 14px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -18px color-mix(in srgb, var(--charcoal) 45%, transparent); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease, visibility 0s .16s }
  .top.open nav { visibility: visible; opacity: 1; transform: none; transition: opacity .16s ease, transform .16s ease }
  .top nav a { font-size: 17px; padding: 12px 14px; border-radius: 12px }
}
@media (prefers-reduced-motion: reduce) { .top nav, .top.open nav, .top .menu path { transition: none } }
