/* Notes: chsmc-like layout in the site's pixel style.
   Titles PP NeueBit (1px = 1/14 em: 28, 42, 56), dates and labels Departure Mono
   (1px = 1/11 em: 11, 22), body iA Writer Quattro (self-hosted, OFL). */
@font-face { font-family: "iA Writer Quattro"; src: url("../fonts/ia-writer-quattro/iAWriterQuattroS-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "iA Writer Quattro"; src: url("../fonts/ia-writer-quattro/iAWriterQuattroS-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "iA Writer Quattro"; src: url("../fonts/ia-writer-quattro/iAWriterQuattroS-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "iA Writer Quattro"; src: url("../fonts/ia-writer-quattro/iAWriterQuattroS-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

.notes-wrap {
  --n-ink: var(--color--text, #010101);
  --n-body: var(--color--text-light, #3d4653);
  --n-head: var(--color--branded-primary, #0b3861);
  --n-link: var(--swatch--primary-70, #005fb5);
  --n-date: var(--swatch--secondary-50, #169082);
  --n-line: var(--swatch--ecru-50, #cbc8c1);
  --n-fill: var(--swatch--ecru-20, #f5f4f0);
  --n-shade: var(--swatch--ecru-40, #e2e0da);
  --n-mono: "Departure Mono", "Departure Mono Fallback", ui-monospace, monospace;
  --n-display: "PP NeueBit", "PP NeueBit Fallback", "Departure Mono", "Departure Mono Fallback", monospace;
  --n-text: "iA Writer Quattro", "Departure Mono", ui-monospace, monospace;
  display: grid;
  grid-template-columns: minmax(0, 640px) minmax(220px, 1fr);
  column-gap: 64px;
  padding: 136px 15% 96px;
  color: var(--n-body);
}
.notes-main { min-width: 0; }

/* headings */
.notes-heading {
  font: 400 11px/22px var(--n-mono);
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--n-ink); margin: 0 0 32px;
}
.note-title { font-family: var(--n-display); font-weight: 400; font-size: 42px; line-height: 48px; color: var(--n-head); margin: 0 0 16px; text-wrap: balance; }
.note-title a { color: inherit; text-decoration: none; }
.note-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.note-title--single { font-size: 56px; line-height: 64px; margin-bottom: 24px; }

/* the date sits inline before the first line, chsmc style */
.note-date {
  font: 400 14px/1 var(--n-mono); text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--n-date); margin-right: 0.5em; white-space: nowrap;
}
.note-date::after { content: " /"; opacity: 0.6; }
.note-date a { color: inherit; text-decoration: none; }
.note-date a:hover { text-decoration: underline; }
.note-draft {
  display: inline-block; margin-bottom: 12px; padding: 2px 6px;
  font: 400 11px/16px var(--n-mono); text-transform: uppercase;
  color: var(--n-ink); background: var(--n-fill); border: 1px solid var(--n-line);
}

/* body */
.note-body, .notes-empty { --site-font: var(--n-text); } /* the site sets p, a, li, blockquote to var(--site-font) */
.note-body { font-family: var(--n-text); font-size: 18px; line-height: 30px; color: var(--n-body); overflow-wrap: break-word; }
.note-body > * + * { margin-top: 20px; }
.note-body p { margin: 0; }
.note-body > * + p, .note-body > p + * { margin-top: 20px; }
.note-body strong { font-family: inherit; font-weight: 700; color: var(--n-ink); }
.note-body em { font-style: italic; }
.note-body a { color: var(--n-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.note-body a:hover { text-underline-offset: 5px; }
.note-body h2, .note-body h3, .note-body h4, .note-body h5, .note-body h6 { color: var(--n-ink); margin: 40px 0 8px; font-weight: 400; }
.note-body h2 { font: 400 28px/32px var(--n-display); }
.note-body h3, .note-body h4, .note-body h5, .note-body h6 { font: 400 11px/22px var(--n-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.note-body h2 + *, .note-body h3 + * { margin-top: 8px; }
.note-body blockquote { margin: 24px 0; padding: 0 0 0 20px; border: 0; border-left: 4px solid var(--n-head); border-radius: 0; background: none; color: var(--n-ink); font-size: inherit; line-height: inherit; font-weight: 400; }
.note-body blockquote > * + * { margin-top: 12px; }
.note-body ul, .note-body ol { padding-left: 1.4em; margin: 0; }
.note-body ul { list-style: none; padding-left: 0; }
.note-body ul > li { position: relative; padding-left: 22px; }
.note-body ul > li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 6px; height: 6px; background: var(--n-head); }
.note-body li + li { margin-top: 8px; }
.note-body li.task::before { width: 10px; height: 10px; top: 10px; left: 2px; background: transparent; box-shadow: inset 0 0 0 2px var(--n-head); }
.note-body li.task.done::before { background: var(--n-head); }
.note-body mark { background: var(--swatch--studocu-lime, #e0ff6e); color: #010101; padding: 0 2px; }
.note-body code { font: 400 0.84em/1 var(--n-mono); background: var(--n-fill); border: 1px solid var(--n-line); padding: 1px 4px; color: var(--n-ink); }
.note-body pre { background: var(--n-fill); border: 1px solid var(--n-line); box-shadow: 4px 4px 0 var(--n-shade); padding: 16px; overflow: auto; }
.note-body pre code { font-size: 14px; line-height: 22px; background: none; border: 0; padding: 0; }
.note-body hr { border: 0; height: 4px; margin: 40px 0; background: repeating-linear-gradient(90deg, var(--n-line) 0 2px, transparent 2px 6px); }
.note-body figure { margin: 32px 0; }
.note-body img { display: block; max-width: 100%; height: auto; border: 1px solid var(--n-line); image-rendering: auto; }
.note-body figcaption { margin-top: 8px; font: 400 11px/16px var(--n-mono); text-transform: uppercase; color: var(--color--text-light, #5f6b7a); }
.note-callout { border: 1px solid var(--n-line); background: var(--n-fill); box-shadow: 4px 4px 0 var(--n-shade); padding: 14px 16px; }
.note-callout__title { font: 400 11px/22px var(--n-mono); text-transform: uppercase; color: var(--n-ink); }
.note-callout > * + * { margin-top: 8px; }
.note-table { overflow-x: auto; }
.note-table table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 24px; }
.note-table th, .note-table td { border-bottom: 1px solid var(--n-line); padding: 6px 12px 6px 0; text-align: left; vertical-align: top; }
.note-table th { font: 400 11px/22px var(--n-mono); text-transform: uppercase; color: var(--n-ink); }

/* feed: dithered dot row between notes */
.notes-feed .note + .note { margin-top: 48px; }
.notes-feed .note + .note::before {
  content: ""; display: block; height: 4px; margin-bottom: 48px;
  background: repeating-linear-gradient(90deg, var(--n-line) 0 4px, transparent 4px 12px);
}
.note-body--excerpt { -webkit-mask-image: linear-gradient(#000 0 55%, transparent 100%); mask-image: linear-gradient(#000 0 55%, transparent 100%); }
.note-tear { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.note-tear span { flex: 1; height: 8px; background:
  linear-gradient(135deg, transparent 0 3px, var(--n-line) 3px 4px, transparent 4px) 0 0 / 8px 8px repeat-x,
  linear-gradient(45deg, transparent 0 3px, var(--n-line) 3px 4px, transparent 4px) 4px 0 / 8px 8px repeat-x; }
.note-more { font: 400 11px/16px var(--n-mono); text-transform: uppercase; color: var(--n-link); text-decoration: none; white-space: nowrap; }
.note-more::after { content: " \2192"; }

.notes-pager { display: flex; align-items: baseline; gap: 24px; margin-top: 56px; font: 400 11px/22px var(--n-mono); text-transform: uppercase; }
.notes-pager ol { display: flex; gap: 14px; list-style: none; padding: 0; margin: 0; }
.notes-pager a { color: var(--n-ink); text-decoration: none; }
.notes-pager__step.is-off { opacity: 0.35; }
.notes-pager__current { border: 1px solid var(--n-ink); padding: 0 5px; color: var(--n-ink); }
.notes-empty { font-family: var(--n-text); font-size: 18px; }

/* article footer */
.note-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 32px 0 0; }
.note-tags li { font: 400 11px/16px var(--n-mono); text-transform: uppercase; border: 1px solid var(--n-line); padding: 2px 6px; color: var(--n-ink); }
.note-sep { height: 4px; margin: 56px 0 40px; background: repeating-linear-gradient(90deg, var(--n-line) 0 2px, transparent 2px 6px); }
.note-pager { display: flex; flex-direction: column; gap: 20px; }
.note-pager span { display: block; font: 400 11px/16px var(--n-mono); text-transform: uppercase; color: var(--color--text-light, #5f6b7a); margin-bottom: 4px; }
.note-pager a { font: 400 28px/32px var(--n-display); color: var(--n-ink); text-decoration: none; }
.note-pager a:hover { text-decoration: underline; text-underline-offset: 5px; }
.note-back { margin-top: 40px; display: flex; gap: 24px; font: 400 11px/16px var(--n-mono); text-transform: uppercase; }
.note-back a { color: var(--n-link); text-decoration: none; }

/* pixel note card (chsmc's taped card), sticky at the bottom of the side column */
/* Hidden for now (rendered with the hidden attribute). Reserved as a reusable
   "taped note" for side notes or explanations next to a paragraph in a note. */
.notes-card[hidden] { display: none; }
.notes-card {
  position: sticky; bottom: 32px; align-self: end; justify-self: end;
  width: 100%; max-width: 260px; margin-top: 40px;
  background: var(--n-fill); border: 1px solid var(--n-line); box-shadow: 4px 4px 0 var(--n-shade);
  padding: 24px 18px 16px; rotate: 1deg;
  font: 400 11px/16px var(--n-mono); text-transform: uppercase; color: var(--color--text-light, #5f6b7a);
}
.notes-card::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 84px; height: 16px; translate: -50% 0;
  background: repeating-linear-gradient(45deg, var(--n-line) 0 2px, transparent 2px 4px); opacity: 0.85;
}
.notes-card__title { font: 400 21px/28px var(--n-display); text-transform: none; color: var(--n-ink); margin-bottom: 4px; }
.notes-card p { margin: 0; }
.notes-card ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 20px; }
.notes-card a { color: var(--n-link); text-decoration: none; }
.notes-card a:hover { text-decoration: underline; }

@media screen and (max-width: 991px) {
  .notes-wrap { grid-template-columns: minmax(0, 1fr); padding: 120px 8% 72px; }
  .notes-card { position: static; justify-self: start; margin-top: 56px; rotate: 0.6deg; }
}
@media screen and (max-width: 767px) {
  .notes-wrap { padding: 104px 20px 64px; }
  .note-title { font-size: 28px; line-height: 32px; }
  .note-title--single { font-size: 42px; line-height: 48px; }
  .note-body { font-size: 17px; line-height: 28px; }
  .note-date { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .notes-card { rotate: 0deg; } }
