/* Two inks on newsprint.  One typeface.  No scripts. */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --accent is the orange from the Cook To Survive app. */
:root {
  --paper: #e8e9e1;
  --ink: #1a1f4b;
  --soft: #4b5180;
  --accent: #e2501f;
  --accent-text: #a8431b;
  --rule: rgba(26, 31, 75, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12143a;
    --ink: #ecebfa;
    --soft: #a9acd6;
    --accent: #e0894b;
    --accent-text: #e0894b;
    --rule: rgba(236, 235, 250, 0.24);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-wrap: break-word;
}

::selection { background: var(--accent); color: var(--paper); }

header, main, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Letterhead */

header { padding-top: 2rem; }

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.5rem;
  margin-top: 0.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--ink);
  font-size: 0.85rem;
}

nav a { color: var(--soft); text-decoration: none; }
nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* Text */

main { padding-top: 3rem; padding-bottom: 4rem; }

h1 {
  font-size: clamp(1.9rem, 7vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

h2 {
  font-size: 1rem;
  color: var(--accent-text);
  margin: 2.5rem 0 0.4rem;
}

h3 { font-size: 1rem; margin: 1.5rem 0 0.25rem; }

p { margin: 0 0 1rem; }

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lede { font-size: 1.2rem; line-height: 1.45; }
.updated { color: var(--soft); font-size: 0.85rem; }

ul { list-style: none; margin: 0 0 1rem; padding: 0; }
ul li { position: relative; padding-left: 2ch; margin: 0.35rem 0; }
ul li::before { content: "-"; position: absolute; left: 0; font-weight: 700; color: var(--accent-text); }

/* Home:  'Label:' in the margin, the way the notes are written. */

.memo section { margin-top: 2rem; }
.memo h2 { margin: 0 0 0.25rem; }
.memo section > :last-child, .memo section > div > :last-child { margin-bottom: 0; }

@media (min-width: 40rem) {
  .memo section {
    display: grid;
    grid-template-columns: 7ch minmax(0, 1fr);
    column-gap: 2ch;
  }
}

.signoff { margin: 3.5rem 0 0; font-size: 1.2rem; font-weight: 700; }

/* Cook To Survive:  a plan, as the scheduler prints it. */

.plan {
  list-style: none;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.plan li {
  display: grid;
  grid-template-columns: 5ch minmax(0, 1fr);
  column-gap: 2ch;
  padding: 0.55rem 0;
}

.plan li + li { border-top: 1px solid var(--rule); }
.plan time { font-weight: 700; color: var(--accent-text); }
.plan p { margin: 0; }
.plan .why { color: var(--soft); font-size: 0.85rem; }
.plan .plate { font-weight: 700; }

/* Footer */

footer { padding-bottom: 2.5rem; color: var(--soft); font-size: 0.8rem; }
footer p { margin: 0 0 0.3rem; }
footer p:first-child { border-top: 2px solid var(--ink); padding-top: 1rem; }
