/* scottnelson.xyz. One stylesheet, no JavaScript. The design is round 3 "Introduction v2, blue, no photo"
   with Scott's three changes (his own opening line, the Workbench blue as the accent, more room for apps).
   build.py rewrites the font file paths to the hashed file names and reads the colors below for the
   share image and the favicon, so this :root block is the one place the colors live. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-roman.6e4f2958c3.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  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: "Newsreader";
  src: url("/assets/fonts/newsreader-italic.2bf0dbb1a4.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  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: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.2ee17598a9.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  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;
}

:root {
  --paper: #f6f4ef;
  --panel: #e9ebee;
  --ink: #171b24;
  --muted: #535965;
  --rule: #d6d6d4;
  --accent: #2443d8;
  --deep: #172b4a;
  --on-deep: #eef1f6;
  --on-deep-soft: #b4c1d6;
  --deep-rule: #304a70;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 40px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.podcast :focus-visible { outline-color: var(--on-deep); }
[id] { scroll-margin-top: 16px; }
h1, h2, h3, p, ul, ol { margin: 0; }
p, li, .c-line { text-wrap: pretty; }
.post .hit, .lede { text-wrap: pretty; }
/* balance after pretty: Firefox ignores pretty, and balance keeps a lone word off the last line of a title */
.post .hit, .ep-title, .page-head h1, .rr .hit { text-wrap: balance; }
ul.plain { list-style: none; padding: 0; }

.skip {
  position: absolute; left: 16px; top: -200px; z-index: 10;
  padding: 12px 16px; background: var(--ink); color: var(--paper);
  font-weight: 600; text-decoration: none; border-radius: 3px;
}
.skip:focus { top: 16px; color: var(--paper); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; align-items: start; }

/* small print */
.kicker {
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--accent);
}
.badge {
  display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; line-height: 1; padding: 5px 8px; border-radius: 3px; white-space: nowrap;
  color: #ffffff; background: var(--accent);
}
.badge.soon { color: var(--ink); background: var(--panel); }
.badge.light { color: var(--deep); background: var(--on-deep); }

/* arrows are inline SVG with presentation attributes; color comes from currentColor */
.arr { width: 13px; height: 13px; flex: none; overflow: visible; }
.arr path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.textlink {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--accent);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap;
}

/* header */
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px;
  padding: 19px 0 17px; border-bottom: 1px solid var(--rule);
}
.site-name, .site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; color: var(--ink); text-decoration: none;
}
.site-name { font-weight: 600; }
.site-nav a { font-weight: 500; }
.site-nav a:hover, .site-name:hover { color: var(--accent); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 32px; }

/* hero */
.hero { padding: 72px 0 96px; }
.hero-intro { grid-column: span 7; padding-right: 24px; }
.hero h1 {
  margin-top: 30px; font-family: var(--serif); font-size: clamp(3.25rem, 15vw, 7rem); line-height: 0.94;
  font-weight: 500; letter-spacing: -0.025em; color: var(--ink);
}
.lede { margin-top: 40px; font-family: var(--serif); font-size: 31px; line-height: 1.38; font-weight: 400; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 30px; }

.contents { grid-column: 9 / span 4; padding-top: 6px; }
.contents ul { margin-top: 18px; border-bottom: 1px solid var(--rule); }
.contents li a { display: block; padding: 20px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.c-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.c-title { font-family: var(--serif); font-size: 28px; line-height: 1.1; font-weight: 500; letter-spacing: -0.01em; }
.c-head .arr { color: var(--accent); width: 15px; height: 15px; }
.c-line { display: block; margin-top: 7px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.c-meta { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.contents li a:hover .c-title { color: var(--accent); }

/* sections: title column on the left, ruled list on the right */
.block { border-top: 1px solid var(--ink); padding: 56px 0 84px; }
.block-side { grid-column: span 4; padding-right: 36px; }
.block-main { grid-column: span 8; }
.block h2 {
  font-family: var(--serif); font-size: 54px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; color: var(--ink);
}
.block-line { margin-top: 18px; font-size: 17px; line-height: 1.5; }
.block-meta { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.block-link { margin-top: 14px; }

/* a row whose name link covers the whole row, so the tap target is the row */
.row { position: relative; display: grid; grid-template-columns: 256px minmax(0, 1fr); column-gap: 24px; align-items: baseline; border-top: 1px solid var(--rule); }
.row:first-child { border-top: 0; padding-top: 0; }
.row .hit::after { content: ""; position: absolute; inset: 0; }
.row:has(.hit:focus-visible) { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
.row .hit:focus-visible { outline: none; }

/* apps: the roomy list */
.group + .group { margin-top: 46px; }
.group .kicker { margin-bottom: 12px; }
.group ul { border-top: 1px solid var(--ink); padding-top: 24px; }
.app { padding: 24px 0; }
.app:last-child { padding-bottom: 0; }
.app .hit {
  display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--serif); font-size: 28px; line-height: 1.1;
  font-weight: 500; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.app .hit .arr { color: var(--accent); width: 14px; height: 14px; }
.app:hover .hit { color: var(--accent); }
.app-plat { display: block; margin-top: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.app-blurb { font-size: 17px; line-height: 1.55; color: var(--muted); }

/* writing: three tighter rows */
.block.writing { padding: 48px 0 64px; }
.post { padding: 18px 0; }
.post:last-child { padding-bottom: 0; }
.post-date { font-size: 13px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.post .hit {
  font-family: var(--serif); font-size: 23px; line-height: 1.25; font-weight: 500; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none;
}
.post:hover .hit { color: var(--accent); }
.post-sub { margin-top: 4px; font-family: var(--serif); font-size: 17px; line-height: 1.4; font-style: italic; color: var(--muted); }

/* podcast band */
.podcast { background: var(--deep); color: var(--on-deep); }
.podcast .grid { padding: 72px 0 76px; }
.podcast-side { grid-column: span 4; padding-right: 36px; }
.pod-top { display: flex; align-items: center; gap: 12px; }
.podcast .kicker { color: var(--on-deep-soft); }
.podcast h2 {
  margin-top: 22px; font-family: var(--serif); font-size: 54px; line-height: 1; font-weight: 500;
  letter-spacing: -0.02em; color: var(--on-deep);
}
.pod-line { margin-top: 18px; font-size: 17px; line-height: 1.5; }
.pod-how { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--on-deep-soft); }
.pod-count { margin-top: 22px; font-size: 15px; line-height: 1.5; color: var(--on-deep-soft); }
.podcast .textlink { margin-top: 8px; color: var(--on-deep); }
.podcast .textlink:hover { color: var(--on-deep-soft); }
/* two columns read top to bottom, newest first, like the design */
.episodes { grid-column: span 8; columns: 2; column-gap: 40px; }
.ep { break-inside: avoid; }
.podcast h2 a { color: inherit; text-decoration: none; }
.podcast h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.episodes.soon { columns: 1; }   /* three titles while the show is coming soon */
.ep { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--deep-rule); }
.ep-title { font-family: var(--serif); font-size: 20px; line-height: 1.28; color: var(--on-deep); text-wrap: balance; }
.ep-min { font-size: 13px; font-weight: 500; color: var(--on-deep-soft); white-space: nowrap; }

/* recipes: one quiet strip */
.recipes .grid { align-items: baseline; padding: 56px 0 64px; }
.recipes-side { grid-column: span 4; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.recipes h2 { font-family: var(--serif); font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.recipes .kicker { color: var(--muted); }
.recipes-main { grid-column: span 8; }
.recipes-line { margin-bottom: 14px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.recipe-list { display: flex; flex-wrap: wrap; gap: 0 30px; }
.recipe-list li { font-family: var(--serif); font-size: 21px; line-height: 1.3; white-space: nowrap; }
.recipe-list a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--rule);
}
.recipe-list a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.recipes-all { margin-top: 10px; }

/* recipe pages: the index and one page per recipe */
.page-head { padding: 64px 0 40px; }
.page-head .kicker a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: none; }
.page-head .kicker a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.page-head h1 {
  margin-top: 14px; font-family: var(--serif); font-size: clamp(2.75rem, 9vw, 5.25rem); line-height: 0.98;
  font-weight: 500; letter-spacing: -0.025em; max-width: 18ch;
}
.page-head .lede { margin-top: 24px; max-width: 30ch; }
.recipe-meta { margin-top: 22px; font-size: 14px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.recipe-intro { margin-top: 14px; font-family: var(--serif); font-size: 21px; line-height: 1.4; font-style: italic; color: var(--muted); }
.page-links { padding: 40px 0 72px; }
.page-links ul { display: flex; flex-wrap: wrap; gap: 0 28px; }

.recipe-rows { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.rr { position: relative; padding: 18px 0; border-top: 1px solid var(--rule); }
.rr:first-child { border-top: 0; }
.rr .hit { font-family: var(--serif); font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.rr .hit::after { content: ""; position: absolute; inset: 0; }
.rr:hover .hit { color: var(--accent); }
.rr:has(.hit:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.rr .hit:focus-visible { outline: none; }
.rr:has(.rr-photo) { display: flex; align-items: center; gap: 22px; padding: 12px 0; }
.rr-photo { flex: none; display: block; width: 96px; height: 64px; object-fit: cover; border-radius: 3px; background: var(--panel); }
.photos-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.photos-note + .page-links { padding-top: 26px; }

/* the dish photo: beside the title on wide screens, under it on narrow ones */
.page-head.has-photo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 40px; align-items: end; }
.recipe-photo { margin: 0; }
.recipe-photo img { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--panel); }
.recipe-photo figcaption { margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }

.recipe-body { border-top: 1px solid var(--ink); padding-top: 36px; }
.ingredients { grid-column: span 4; padding-right: 36px; }
.method { grid-column: span 8; }
.recipe-body h2 { font-family: var(--serif); font-size: 30px; line-height: 1.1; font-weight: 500; letter-spacing: -0.01em; }
.ingredients ul { margin-top: 14px; }
.ingredients li { padding: 11px 0; border-top: 1px solid var(--rule); font-size: 17px; line-height: 1.45; }
.ingredients li:first-child { border-top: 0; }
.steps { margin-top: 14px; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: baseline;
  padding: 13px 0; border-top: 1px solid var(--rule); font-size: 18px; line-height: 1.5; }
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: counter(step); font-family: var(--serif); font-size: 26px; line-height: 1; font-weight: 500; color: var(--accent);
}
.recipe-notes { margin-top: 40px; }
.recipe-notes ul { margin-top: 12px; padding-left: 20px; }
.recipe-notes li { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--muted); }
.recipe-notes li::marker { color: var(--muted); }

/* footer */
.site-footer .bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px;
  padding: 26px 0 40px; border-top: 1px solid var(--ink);
}
.foot-id { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.foot-name { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.foot-place { font-size: 14px; color: var(--muted); }
.elsewhere ul { display: flex; flex-wrap: wrap; gap: 0 26px; }
.elsewhere a {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--muted);
  white-space: nowrap;
}
.elsewhere a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* 404 */
.notfound { padding: 72px 0 120px; }
.notfound h1 {
  margin-top: 30px; font-family: var(--serif); font-size: clamp(3rem, 11vw, 6rem); line-height: 0.98;
  font-weight: 500; letter-spacing: -0.025em;
}
.notfound .lede { max-width: 30ch; }
.notfound .hero-links { margin-top: 24px; }

/* tablet */
@media (max-width: 1079px) {
  .hero { padding: 56px 0 72px; }
  .hero-intro, .contents { grid-column: 1 / -1; padding-right: 0; }
  .contents { margin-top: 56px; padding-top: 0; }
  .contents ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .lede { font-size: 27px; margin-top: 32px; }
  .block-side, .block-main, .podcast-side, .episodes, .recipes-side, .recipes-main { grid-column: 1 / -1; padding-right: 0; }
  .block-side, .podcast-side { margin-bottom: 40px; }
  .block-line { max-width: 40ch; }
  .recipes-side { margin-bottom: 16px; }
  .ingredients, .method { grid-column: 1 / -1; padding-right: 0; }
  .page-head.has-photo { grid-template-columns: minmax(0, 1fr); }
  .recipe-photo { margin-top: 32px; max-width: 640px; }
  .method { margin-top: 44px; }
  .row { grid-template-columns: 240px minmax(0, 1fr); }
}

/* phone */
@media (max-width: 719px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .site-header .bar { padding: 8px 0 6px; }
  .site-nav ul { gap: 0 22px; }
  .hero { padding: 36px 0 52px; }
  .hero h1 { margin-top: 18px; }
  .lede { font-size: 22px; line-height: 1.4; margin-top: 22px; }
  .hero-links { display: grid; grid-template-columns: repeat(2, max-content); gap: 0 32px; margin-top: 14px; }  /* two even pairs */
  .contents { margin-top: 40px; }
  .contents ul { grid-template-columns: minmax(0, 1fr); }
  .contents li a { padding: 14px 0; }
  .c-line { display: none; }   /* the sections below say it; keeps Apps closer to the top */
  .c-meta { margin-top: 4px; }
  .c-title { font-size: 25px; }
  .block { padding: 40px 0 56px; }
  .block.writing { padding: 40px 0 52px; }
  .block h2, .podcast h2 { font-size: 42px; }
  .block-side, .podcast-side { margin-bottom: 28px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .app { padding: 20px 0; }
  .group ul { padding-top: 20px; }
  .group + .group { margin-top: 36px; }
  .app .hit { font-size: 26px; }
  .app-plat { margin-top: 4px; }
  .app-blurb { margin-top: 8px; font-size: 16px; }
  .post { padding: 16px 0; }
  .post .hit { display: block; margin-top: 6px; font-size: 21px; }
  .post-sub { font-size: 16px; }
  .podcast .grid { padding: 48px 0 52px; }
  .episodes { columns: 1; }
  .ep-title { font-size: 19px; }
  .recipes .grid { padding: 40px 0 48px; }
  .recipes h2 { font-size: 34px; }
  .recipe-list { gap: 6px 22px; }
  .recipe-list li { font-size: 19px; white-space: normal; }
  .page-head { padding: 36px 0 28px; }
  .page-head .lede { margin-top: 16px; }
  .rr { padding: 14px 0; }
  .rr .hit { font-size: 23px; }
  .rr:has(.rr-photo) { gap: 16px; padding: 10px 0; }
  .rr-photo { width: 72px; height: 48px; }
  .recipe-photo { margin-top: 24px; }
  .recipe-body { padding-top: 28px; }
  .recipe-body h2 { font-size: 27px; }
  .steps li { grid-template-columns: 40px minmax(0, 1fr); font-size: 17px; }
  .steps li::before { font-size: 23px; }
  .page-links { padding: 32px 0 52px; }
  .site-footer .bar { flex-direction: column; align-items: flex-start; padding: 26px 0 32px; }
  .elsewhere ul { gap: 0 20px; }
  .notfound { padding: 44px 0 80px; }
}
