/* foundandsolved.com, after the Found and Solved Design Directions canvas:
   home is A, the casebook; 01 Hewn is B, the shop drawing (FS-DR-004).
   Newsreader for display, Inter for text, DM Mono for labels, white paper,
   the plum accent only on links and marks. No scripts. */

@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-v20-latin.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("/assets/fonts/dm-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #ffffff;
  --paper-2: #fbfbf8;
  --grid: #ecede8;
  --ink: #161514;
  --body: #474542;
  --muted: #6b6863;
  --rule: #e4e1db;
  --stroke: #1f1f1d;
  --pencil: #b23a2c;
  --accent: #7b2d57;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --measure: 1168px;
  --line: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 17px/1.65 var(--text);
  font-feature-settings: "kern", "liga";
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main:focus { outline: none; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 10px 14px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 16px; }

.draft-bar { padding: 10px 24px; border-bottom: 1px dashed var(--accent); background: #f7eef3; color: var(--accent); font-size: 14px; line-height: 1.5; }
.draft-bar p { margin: 0 auto; max-width: var(--measure); }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

/* The top bar: one bar on every page, so a reader knows it is the same site. */
.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px;
  padding: 28px 0 20px; border-bottom: 1px solid var(--rule);
}
.wordmark { font: 500 22px/1.2 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; padding: 0; list-style: none; }
.nav a { font: 400 13px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.nav a.nav-talk { color: var(--accent); }
.nav a.nav-talk:hover { color: var(--ink); }

/* The words. */
.prose { max-width: var(--line); padding: clamp(40px, 6vw, 80px) 0 64px; }
.prose > :first-child { margin-top: 0; }
.prose h1 { font: 400 clamp(38px, 5.6vw, 72px)/1.04 var(--display); letter-spacing: -0.02em; color: var(--ink); margin: 0 0 16px; max-width: 14em; }
.prose h1 + h2 { font: 400 clamp(20px, 2.2vw, 26px)/1.35 var(--display); font-style: italic; color: var(--body); margin: 0 0 40px; padding: 0; border: 0; letter-spacing: 0; text-transform: none; }
.prose h2 { font: 400 clamp(28px, 3.2vw, 38px)/1.15 var(--display); color: var(--ink); margin: 64px 0 18px; letter-spacing: -0.01em; }
.prose h3 { font: 400 clamp(24px, 2.6vw, 30px)/1.2 var(--display); color: var(--ink); margin: 56px 0 16px; letter-spacing: -0.01em; }
.prose h4 { font: 500 13px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 10px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 56px 0; }
.prose blockquote { margin: 0 0 40px; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); }
.prose blockquote p { font: 400 clamp(20px, 2vw, 24px)/1.45 var(--display); color: var(--ink); margin-bottom: 8px; }
.prose blockquote p:last-child { font: 400 13px/1.5 var(--mono); letter-spacing: 0.03em; color: var(--muted); }
.prose blockquote p:only-child { font: 400 clamp(20px, 2vw, 24px)/1.45 var(--display); color: var(--ink); letter-spacing: 0; }
.prose em { font-style: italic; }
.prose code { font: 400 0.9em var(--mono); background: var(--paper-2); padding: 1px 4px; border-radius: 2px; }

/* A link to a page that is not built yet reads as plain words. */
.not-yet { color: inherit; }
.draft-bar ~ .wrap .not-yet { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: help; }

/* Tables: the one-line list of problems on /found. */
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 32px; font-size: 15px; line-height: 1.5; }
.prose th { font: 400 12px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 12px 10px 0; border-bottom: 1px solid var(--stroke); }
.prose td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose--found td:first-child { font: 400 13px/1.6 var(--mono); color: var(--pencil); white-space: nowrap; }
.prose--found td:nth-child(2) { color: var(--ink); font-weight: 500; }
.prose--found, .prose--found table { max-width: none; }
.prose--found > :not(table) { max-width: var(--line); }

/* Home, the casebook: the cases section reads as a stack of cards. */
.prose--home h1 { max-width: 12em; }
.prose--home h3 + p > strong:only-child { font: 400 clamp(24px, 2.4vw, 30px)/1.25 var(--display); color: var(--ink); }

/* The foot. */
.site-foot {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px 48px;
  border-top: 1px solid var(--stroke); padding: 28px 0 56px; font-size: 14px; color: var(--muted);
}
.site-foot p { margin: 0; max-width: 34em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 4px; }
.foot-label { font: 400 12px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }

/* 404 */
.page-head { padding: clamp(40px, 6vw, 80px) 0 64px; max-width: var(--line); }
.page-head h1 { font: 400 clamp(38px, 5.6vw, 72px)/1.04 var(--display); color: var(--ink); margin: 0 0 16px; }
.lead { font-size: 19px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-head { padding: 20px 0 14px; }
  .nav { gap: 6px 20px; }
  .site-foot { grid-template-columns: 1fr; }
  .table-scroll { overflow-x: auto; }
  .prose--found .table-scroll { overflow: visible; }
  .prose--found table, .prose--found thead, .prose--found tbody, .prose--found tr, .prose--found td { display: block; }
  .prose--found thead { position: absolute; left: -9999px; }
  .prose--found tr { border-bottom: 1px solid var(--rule); padding: 12px 0; }
  .prose--found td { border: 0; padding: 2px 0; }
  .prose--found td:nth-child(3)::before { content: "Who feels it: "; color: var(--muted); }
  .prose--found td:nth-child(4)::before { content: "Pairs with: "; color: var(--muted); }
  .prose--found td:nth-child(n+3) { font-size: 14px; color: var(--muted); }
}

@media print {
  .skip, .draft-bar, .site-head nav, .site-foot { display: none; }
  a { color: inherit; }
}
.prose--hewn td:nth-child(2) { font: 400 12px/1.6 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
