/* chalkthis.io/chalkboard (Nov 23, 2026): Chalkboard, for restaurants, told as a comic book. Loaded only by that page,
   before pop.css, comic.css and comic-site.css (every page ends with those three; tests/comic.test.ts), so each rule here is
   written more specific than the comic rule it adjusts. The cover, sheets, captions, balloons, rules page and
   finale are comic.css's own; this sheet adds the story panels, the three parts, the math and the steps. */

/* ---------- the cover: an autumn evening (no snow), the owner and her customer on the right ---------- */
.cb-cover .cm-cover-art img { object-position: 100% 70%; }

/* ---------- volume 1: the story ---------- */
.cb-p-rush { grid-column: 1 / -1; height: 380px; }
.cb-p-rush .cm-art img { object-position: 70% 40%; }
.cb-p-rush .cm-balloon { left: 30%; right: auto; top: 18px; }
.cb-p-rush figcaption.cm-caption { max-width: min(44%, 430px); }
.cb-p-statement { grid-column: span 5; height: 460px; }
.cb-p-statement .cm-art img { object-position: 60% 50%; }
.cb-p-statement figcaption.cm-caption { left: 14px; right: auto; top: 14px; bottom: auto; max-width: calc(100% - 96px); }
.cb-p-couch { grid-column: span 7; height: 460px; }
.cb-p-couch .cm-art img { object-position: 60% 50%; }
.cb-p-couch figcaption.cm-caption { left: auto; right: 14px; max-width: min(70%, 430px); }
.cb-p-pickup { grid-column: span 7; height: 440px; }
.cb-p-pickup .cm-balloon { right: 22px; top: 18px; }
.cb-p-pickup .cm-balloon::after { left: auto; right: 44px; transform: skewX(28deg) translateY(-1px); clip-path: polygon(0 0, 100% 0, 100% 100%); border-left: 0; border-right: 3px solid var(--pop-ink); }
.cb-punch { grid-column: span 5; }

/* ---------- volume 2: the three parts ---------- */
.comic .cb-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.cm-panel.cb-part { display: flex; flex-direction: column; overflow: visible; box-shadow: 6px 6px 0 var(--pop-ink); }
.cb-part-art { position: relative; height: 230px; border-bottom: 4px solid var(--pop-ink); overflow: hidden; }
.cb-part-art img { display: block; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.cb-part-body { flex: 1; display: flex; flex-direction: column; gap: var(--space-3); padding: 20px 22px 24px; }
.cb-part-body h3 { margin: 0; }
.cb-part-body > p { margin: 0; color: var(--ink-muted); }
.cb-part-body .home-list { margin: var(--space-2) 0 0; gap: var(--space-2); }
.cb-part--office .cb-part-body { background-color: var(--pop-paper); }
.cb-part--assistant .cb-part-body { background-color: var(--pop-mustard); background-image: var(--pop-dots); background-size: 9px 9px; }
.cb-part--assistant .cb-part-body > p { color: var(--pop-ink); }
.cb-demo { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 28px 0 0; }
.cb-demo .body-s { color: var(--ink-muted); }

/* ---------- the math ---------- */
.comic .cb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: var(--space-12) 0 0; padding: 0; list-style: none; }
.cm-panel.cb-tile { padding: var(--space-6); background-color: var(--pop-paper); }
.cb-tile .cm-price-tag strong { font-size: 64px; color: var(--pop-ink); -webkit-text-stroke: 0; text-shadow: none; }
.cm-panel.cb-tile--back { background-color: var(--pop-mustard); background-image: var(--pop-dots); background-size: 9px 9px; box-shadow: 6px 6px 0 var(--pop-ink); }
.cb-tile--back .cm-price-tag strong { color: var(--pop-cream); -webkit-text-stroke: 2px var(--pop-ink); text-shadow: 4px 4px 0 var(--pop-ink); }
.cb-math-note { margin: 14px 0 0 !important; color: var(--ink-muted); }
.cb-math-foot { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-8); align-items: center; margin-top: var(--space-8); }
.cb-math-ctas { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }

/* ---------- how it starts ---------- */
.cm-page.cb-how { padding-top: 0; }
.comic .cb-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: var(--space-8) 0 0; padding: 0; list-style: none; }
.cm-panel.cb-step { padding: 82px 22px 22px; }
.cb-step h3 { margin: 0 0 6px; }
.cb-step p { margin: 0; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .cb-p-statement, .cb-p-couch, .cb-p-pickup, .cb-punch { grid-column: 1 / -1; }
  .comic .cb-parts, .comic .cb-tiles, .comic .cb-steps { grid-template-columns: minmax(0, 1fr); }
  .cb-part-art { height: 300px; }
  .cb-math-foot { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .cb-p-rush { height: 360px; }
  .cb-p-rush .cm-art img { object-position: 74% 50%; }
  .cb-p-rush .cm-balloon { left: auto; right: 8px; top: 10px; max-width: 150px; padding: 8px 10px; }
  .cb-p-rush figcaption.cm-caption, .cb-p-couch figcaption.cm-caption { max-width: none; left: 14px; right: 14px; }
  .cb-p-statement, .cb-p-couch, .cb-p-pickup { height: 420px; }
  .cb-part-art { height: 220px; }
  .cb-tile .cm-price-tag strong { font-size: 52px; }
}
