/* /mark: The Mark, a design book (C-034). Laid out like a studio's thesis book: generous margins, a
   two-column grid (a margin column for chapter numbers and notes, a text column at a reading measure),
   running heads, figure numbers and captions. Body text in a book face from the reader's own system. */
.bk {
  --book: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --rule: #1D1D1F;
  max-width: 1120px; margin: 0 auto; padding: 0 40px 80px;
}
.bk p, .bk li, .bk dd { font-family: var(--book); font-size: 18px; line-height: 1.6; color: #2C2C2E; }

/* Cover */
.bk-cover { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; padding: 72px 0 64px; border-bottom: 2px solid var(--rule); }
.bk-cover-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.bk-kicker, .bk-edition, .bk-run, .bk-fignum, .bk-cnum { font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-cover h1 { font-family: var(--font); font-size: 96px; line-height: 1; font-weight: 700; letter-spacing: -3px; }
.bk-sub { max-width: 520px; font-size: 22px !important; line-height: 1.45 !important; }
.bk-cover-art { display: flex; align-items: center; justify-content: center; width: 280px; height: 280px; background: var(--soft); border-radius: 50%; }

/* Contents */
.bk-contents { padding: 48px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
.bk-contents h2 { font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.bk-contents ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; max-width: 720px; }
.bk-contents li { break-inside: avoid; }
.bk-contents a { display: flex; align-items: baseline; gap: 16px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.bk-contents a:hover .bk-ctitle { text-decoration: underline; }
.bk-ctitle { font-family: var(--book); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Chapters: a running head, the margin column and the text column. */
.bk-ch { padding-top: 28px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.bk-run { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
.bk-run span { overflow: hidden; text-overflow: ellipsis; }
.bk-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
.bk-margin { min-width: 0; }
.bk-chnum { display: block; font-family: var(--font); font-size: 88px; line-height: 0.9; font-weight: 700; letter-spacing: -3px; color: var(--ink); position: sticky; top: 24px; }
.bk-body { min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.bk-body h2 { font-family: var(--font); font-size: 44px; line-height: 1.08; font-weight: 700; letter-spacing: -1.2px; margin-bottom: 6px; }
.bk-lede { font-size: 22px !important; line-height: 1.5 !important; color: var(--ink) !important; }
.bk-ref { font-family: var(--font); font-size: 11px; font-weight: 700; line-height: 0; margin-left: 2px; }
.bk-ref a { text-decoration: none; color: var(--link); padding: 0 2px; }
.bk-notes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bk-notes p { font-family: var(--font); font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Figures */
.bk-fig { margin: 12px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.bk-wide { margin-right: 0; }
.bk-plate { background: var(--soft); border-radius: 4px; padding: 32px; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.bk-plate-sm { padding: 22px; position: relative; }
.bk-fig figcaption, .bk-mood figcaption, .bk-dont figcaption { font-family: var(--font); font-size: 13px; line-height: 1.5; color: var(--muted); }
.bk-fignum { margin-right: 6px; color: var(--ink); }
.bk-draw { width: 100%; height: auto; max-width: 560px; }
.bk-clear { max-width: 240px; }
.bk-dim { font-family: var(--font); fill: #1D1D1F; }
.bk-dim line { stroke: #1D1D1F; stroke-width: 1; }
.bk-row { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: nowrap; }
.bk-part { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--font); font-size: 13px; text-align: center; min-width: 0; }
.bk-part span { color: var(--muted); white-space: nowrap; }

/* The ten moods */
.bk-moods { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
.bk-mood { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bk-mood figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bk-mood figcaption b { color: var(--ink); }
.bk-words { font-family: var(--font) !important; font-size: 15px !important; font-weight: 600; color: var(--ink) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-when { font-size: 16px !important; }
.bk-gram { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 8px; margin: 0; font-family: var(--font); font-size: 13px; }
.bk-gram dt { color: var(--muted); }
.bk-gram dd { margin: 0; font-family: var(--mono) !important; font-size: 13px !important; line-height: 1.5 !important; display: flex; align-items: center; gap: 6px; }
.bk-chip { flex-shrink: 0; }

/* Colour */
.bk-swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; width: 100%; }
.bk-swatch { display: flex; flex-direction: column; gap: 3px; font-family: var(--font) !important; font-size: 13px !important; line-height: 1.4 !important; min-width: 0; }
.bk-swatch b, .bk-swatch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-swatch span:last-child { color: var(--muted); }
.bk-swatch .bk-chip { margin-bottom: 6px; }

/* Motion */
.bk-rules { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.bk-table { border-collapse: collapse; width: 100%; font-family: var(--font); font-size: 14px; background: #FFFFFF; }
.bk-table th, .bk-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.bk-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.bk-table td:nth-child(2) { white-space: nowrap; }

/* Sizes */
.bk-sizes { align-items: flex-end; gap: 28px; }
.bk-size { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }

/* Misuse */
.bk-dont { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.bk-dont figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bk-x { position: absolute; top: 6px; right: 12px; font-family: var(--font); font-size: 22px; font-weight: 700; color: #C0281E; }

/* Philosophy */
.bk-tenets { margin: 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px 24px; }
.bk-tenets dt { font-family: var(--font); font-size: 15px; font-weight: 700; padding-top: 4px; }
.bk-tenets dd { margin: 0; }

/* References */
.bk-reflist { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.bk-reflist li { font-size: 16px; }
.bk-colophon { font-family: var(--font) !important; font-size: 13px !important; color: var(--muted) !important; margin-top: 16px; }
.bk-refs { border-bottom: 0; }

/* The design system (chapters 9 to 19): sources, pills, type, space, controls, the line map, glyphs. */
.bk-own { font-style: italic; }
.bk-src { display: inline-block; font-size: 12px; color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: baseline; }
.bk-table td { overflow-wrap: anywhere; }
.bk-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 16px; width: 100%; }
.bk-pill { font-family: var(--font); font-size: 13px; font-weight: 600; padding: 3px 11px; border-radius: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bk-pill-note, .bk-pill-ask { background: #F0F6FF; color: #0062CC; }
.bk-pill-confirmed { background: #E9F6EF; color: #1E6B4E; }
.bk-pill-disputed { background: #FDECEA; color: #9B1C14; }
.bk-pill-tag { background: #F5F5F7; color: #1D1D1F; border: 1px solid #D1D1D6; }
.bk-stack { display: flex; flex-direction: column; gap: 16px; width: 100%; min-width: 0; }
.bk-lm { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 13px; white-space: nowrap; }
.bk-lm-g { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; font-size: 12px; font-weight: 800; box-sizing: border-box; }
.bk-lm-turning-point { background: #1D1D1F; color: #FFFFFF; }
.bk-lm-deadline { background: #FFF1E0; color: #8A4300; }
.bk-lm-disputed { background: #FDECEA; color: #9B1C14; }
.bk-lm-agreed { background: #E9F6EF; color: #1E6B4E; }
.bk-lm-money { background: #FFFFFF; color: #1D1D1F; box-shadow: inset 0 0 0 1px #E5E5EA; }
.bk-lm-asked { background: #F0F6FF; color: #0062CC; }
.bk-type { display: flex; flex-direction: column; align-items: center; gap: 14px; font-family: var(--font); color: var(--ink); min-width: 0; max-width: 100%; }
.bk-type-a { font-size: 112px; font-weight: 700; letter-spacing: -4px; line-height: 1; }
.bk-type-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 15px; }
.bk-w4 { font-weight: 400; } .bk-w5 { font-weight: 500; } .bk-w6 { font-weight: 600; } .bk-w7 { font-weight: 700; } .bk-w8 { font-weight: 800; }
.bk-type-mono { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; text-align: center; }
.bk-radii, .bk-ctl { flex-wrap: wrap; }
.bk-gaps { display: flex; align-items: flex-end; justify-content: center; gap: 14px; flex-wrap: wrap; }
.bk-gap { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.bk-glyphs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 12px; width: 100%; color: var(--ink); }
.bk-glyphs li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--font); font-size: 13px; min-width: 0; }
.bk-glyphs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bk-draft { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.bk .bk-draft p, .bk .bk-draft li { font-family: var(--font); font-size: 15px; line-height: 1.5; color: #6B4200; }
.bk-draft ul { margin: 0; padding-left: 20px; }
@media (max-width: 799px) {
  .bk-table td:nth-child(2) { white-space: normal; }
  .bk-table th { letter-spacing: 0.4px; }
  .bk-glyphs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-type-a { font-size: 80px; }
}

/* The marks' motion: CSS only; nothing moves under reduced motion. */
.bkm { overflow: visible; flex-shrink: 0; }
.bkm-p { transform-box: view-box; transform-origin: 20px 20px; }
.bk-dayfill { fill: #6C4CF1; }
html[data-day="0"] .bk-dayfill { fill: #F04A24; } html[data-day="1"] .bk-dayfill { fill: #6C4CF1; } html[data-day="2"] .bk-dayfill { fill: #E03E8C; } html[data-day="3"] .bk-dayfill { fill: #1C7ED6; } html[data-day="4"] .bk-dayfill { fill: #C25E00; } html[data-day="5"] .bk-dayfill { fill: #AE3EC9; } html[data-day="6"] .bk-dayfill { fill: #0A8F6C; }
@keyframes bk-sway { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes bk-spin { to { transform: rotate(360deg); } }
@keyframes bk-swell { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.13); } }
@keyframes bk-askew { 0%, 100% { transform: rotate(16deg) translateY(0); } 50% { transform: rotate(30deg) translateY(-1.2px); } }
@keyframes bk-scan { 0%, 100% { transform: rotate(-42deg); } 50% { transform: rotate(42deg); } }
@keyframes bk-burst { 0% { transform: scale(1) rotate(0); } 14% { transform: scale(1.32) rotate(70deg); } 30% { transform: scale(0.94) rotate(300deg); } 42%, 100% { transform: scale(1) rotate(360deg); } }
@keyframes bk-breach { 0%, 100% { transform: scale(1); } 40%, 60% { transform: scale(0.74); } }
@keyframes bk-shudder { 0%, 100% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(-0.7px, 0.3px) rotate(-4deg); } 40% { transform: translate(0.6px, -0.4px) rotate(3deg); } 60% { transform: translate(-0.5px, -0.3px) rotate(-3deg); } 80% { transform: translate(0.7px, 0.4px) rotate(4deg); } }
@keyframes bk-hug { 0%, 100% { transform: scale(1); } 30%, 70% { transform: scale(0.72); } }
@keyframes bk-glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.82; } }
@keyframes bk-flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes bk-pop { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.25); } 36% { transform: scale(1); } }
.bk-sway { animation: bk-sway 4.2s ease-in-out infinite; }
.bk-slow { animation: bk-spin 6s linear infinite; }
.bk-spin { animation: bk-spin 1s linear infinite; }
.bk-swell { animation: bk-swell 1s ease-in-out infinite; }
.bk-askew { animation: bk-askew 1.7s ease-in-out infinite; }
.bk-scan { animation: bk-scan 0.9s ease-in-out infinite; }
.bk-burst { animation: bk-burst 2.8s cubic-bezier(0.2, 0.8, 0.3, 1) infinite; }
.bk-breach { animation: bk-breach 1.5s ease-in-out infinite; }
.bk-shudder { animation: bk-shudder 0.32s linear infinite; }
.bk-hug { animation: bk-hug 2.2s ease-in-out infinite; }
.bk-glow { animation: bk-glow 3.6s ease-in-out infinite; }
.bk-flash { animation: bk-flash 0.8s ease-in-out infinite; }
.bk-blink { animation: bk-flash 1.2s steps(2, start) infinite; }
.bk-pop { animation: bk-pop 2.8s ease-out infinite; }
.bk-droop { transform: rotate(38deg); }
.bkm-still .bkm-p { animation: none; }
@media (prefers-reduced-motion: reduce) { .bkm .bkm-p { animation: none; } }

/* Narrower: one column, the chapter number above its title. */
@media (max-width: 1099px) {
  .bk-wide { margin-right: 0; }
  .bk-grid, .bk-contents { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bk-chnum { position: static; font-size: 56px; }
  .bk-body { max-width: none; }
}
@media (max-width: 799px) {
  .bk { padding: 0 16px 56px; }
  .bk-cover { grid-template-columns: minmax(0, 1fr); padding: 40px 0; gap: 28px; }
  .bk-cover h1 { font-size: 64px; letter-spacing: -2px; }
  .bk-cover-art { width: 200px; height: 200px; justify-self: center; }
  .bk-cover-art svg { width: 150px; height: 150px; }
  .bk-contents ol { columns: 1; }
  .bk-body h2 { font-size: 34px; }
  .bk p, .bk li, .bk dd { font-size: 17px; }
  .bk-lede { font-size: 19px !important; }
  .bk-moods { grid-template-columns: minmax(0, 1fr); }
  .bk-dont { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-tenets { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bk-tenets dd { margin-bottom: 14px; }
  .bk-row { gap: 16px; }
  .bk-row svg { max-width: 30vw; height: auto; }
  .bk-plate { padding: 20px 12px; }
  .bk-sizes { gap: 12px; }
  .bk-table th, .bk-table td { padding: 6px 6px; font-size: 13px; }
}
@media (max-width: 419px) {
  .bk-part span { white-space: normal; }
}
/* A 320 px phone: rows of marks wrap or shrink to fit, and tables tighten, so nothing is cut at the plate's edge. */
@media (max-width: 419px) {
  .bk-row { gap: 10px; }
  .bk-row svg { max-width: 24vw; }
  .bk-sizes { flex-wrap: wrap; }
  .bk-table th, .bk-table td { padding: 5px 4px; font-size: 12px; }
}
.bk-h3 { margin: 28px 0 10px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
