/* ==========================================================================
   TEMPLATES — her shop as a Notion database (templates.html, js/templates.js)
   A short header (no cover: the templates themselves are the picture); the page's properties; a toolbar
   that sticks under the nav; cards that lean towards the pointer; and
   Notion's Side Peek for each template, with its checkout.
   (Built on notion.css: its tokens, tags, views and the database's three
   views, .db / .tpl.)
   ========================================================================== */
.mk { position: relative; z-index: 1; padding: clamp(92px, 9vw, 108px) 0 40px; }

/* --- the page header -------------------------------------------------------------------- */
.mk-head { position: relative; max-width: 900px; }
.mk-icon { display: block; width: 56px; height: 56px; padding: 7px; border-radius: 15px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line), var(--sh-block); }
.mk-icon svg { width: 100%; height: 100%; }
.mk-crumb { display: flex; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--ink-4); }
.mk-crumb a { color: var(--ink-3); } .mk-crumb a:hover { color: var(--ink); text-decoration: underline; } .mk-crumb span { color: var(--line-2); }
.mk-head h1 { margin-top: 8px; font: 500 clamp(1.9rem, 3.3vw, 2.7rem)/1.05 var(--f-display); letter-spacing: -.032em; color: var(--ink); text-wrap: balance; }
.mk-head h1 em { font-weight: 400; }
.mk-lede { margin-top: 10px; max-width: 74ch; font-size: clamp(14.5px, 1.1vw, 16px); color: var(--ink-3); }
.mk-props { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.mk-props > div { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
.mk-props dt { color: var(--ink-4); }
.mk-props dd { color: var(--ink-2); }
.mk-props b { color: var(--ink); }

/* --- the toolbar: stays in its place above the templates (it doesn't follow the scroll) ------ */
.mk-db { margin-top: clamp(22px, 2.6vw, 30px); }
.mk-bar { position: relative; z-index: 50; display: grid; grid-template-columns: minmax(0, 380px) auto; grid-template-areas: "find opts" "cats cats"; justify-content: space-between; align-items: center; gap: 10px 14px; padding: 10px; border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); box-shadow: var(--sh-block); }
.mk-find { grid-area: find; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px; border-radius: 9px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, background-color .2s; }
.mk-find:focus-within { background: var(--sheet); box-shadow: 0 0 0 2px var(--focus); }
.mk-find svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--ink-4); stroke-width: 1.6; stroke-linecap: round; }
.mk-find input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14.5px; color: var(--ink); }
.mk-find input:focus { outline: none; }
.mk-find kbd { font: 500 11px/1 var(--f-mono); padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--ink-3); background: var(--sheet); }
.mk-cats { grid-area: cats; display: flex; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.mk-cats::-webkit-scrollbar { display: none; }
.mk-cats { padding-block: 9px 3px; }
.mk-cats button { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 38px; padding: 0 12px 0 7px; border-radius: 999px; font-size: 13.5px; font-weight: 550; color: var(--ink-3); transition: background-color .2s, color .2s, opacity .2s; }
.mk-cats button:hover { background: var(--hover); color: var(--ink); }
.mk-cats button[aria-pressed="true"] { color: var(--on-ink); background: var(--ink); }
.mk-cats .n { font: 500 11.5px/1 var(--f-mono); opacity: .6; }
.mk-cats button.empty { opacity: .45; }
.mk-cats button.empty:hover { opacity: .8; }

/* --- the categories' cartoons (js/templates.js, CATICON): ink outlines, flat colour, a white sticker edge.
   They pop in one after another when the page opens and play their act once; then again on each hover. */
.ci { flex: none; width: 26px; height: 26px; overflow: visible;
  filter: drop-shadow(1.2px 0 0 #fff) drop-shadow(-1.2px 0 0 #fff) drop-shadow(0 1.2px 0 #fff) drop-shadow(0 -1.2px 0 #fff) drop-shadow(0 1.5px 1px rgba(15, 15, 15, .18)); }
:root[data-theme="dark"] .ci { filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, .35)); } /* dark mode: no white sticker edge */
.ci * { transform-box: fill-box; transform-origin: center; }
.tag .ci, .colh .ci { width: 16px; height: 16px; margin: -2px 1px 0 -2px; vertical-align: middle; filter: none; }
.mk-cats.ci-intro .ci { animation: ci-in .7s var(--e-spring) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
@keyframes ci-in { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.18) rotate(8deg); opacity: 1; } 100% { transform: none; } }
/* each one's act, played at the end of its pop-in, and on hover */
.mk-cats.ci-intro button .ci *, .mk-cats button:hover .ci * { animation-delay: calc(var(--i) * 90ms + 650ms); }
.mk-cats button:hover .ci * { animation-delay: 0s; }
.mk-cats.ci-intro .ci-p1, .mk-cats button:hover .ci-p1 { animation: ci-fan-l .8s var(--e-spring); }
.mk-cats.ci-intro .ci-p2, .mk-cats button:hover .ci-p2 { animation: ci-fan-r .8s var(--e-spring); }
@keyframes ci-fan-l { 45% { transform: translate(-3px, 1px) rotate(-14deg); } }
@keyframes ci-fan-r { 45% { transform: translate(3px, 1px) rotate(14deg); } }
.mk-cats.ci-intro .ci-bc, .mk-cats button:hover .ci-bc { animation: ci-hop .8s var(--e-out); transform-origin: 50% 100%; }
@keyframes ci-hop { 30% { transform: translateY(-4px) rotate(-7deg) scale(1.04, .97); } 55% { transform: translateY(0) rotate(5deg) scale(.96, 1.05); } 78% { transform: rotate(-2deg); } }
.mk-cats.ci-intro .ci-clasp, .mk-cats button:hover .ci-clasp { animation: ci-clasp .8s var(--e-out); }
@keyframes ci-clasp { 35%, 60% { transform: scaleY(-1) translateY(1px); } }
.mk-cats.ci-intro .ci-coin, .mk-cats button:hover .ci-coin { animation: ci-coin .9s var(--e-out); }
@keyframes ci-coin { 22% { transform: translateY(-5px) scaleX(-1); } 44% { transform: translateY(-6px) scaleX(1); } 66% { transform: translateY(2px) scaleX(-1); } 82% { transform: translateY(-1px) scaleX(1); } }
.mk-cats.ci-intro .ci-stack, .mk-cats button:hover .ci-stack { animation: ci-squish .9s var(--e-out); transform-origin: 50% 100%; }
@keyframes ci-squish { 60%, 70% { transform: scale(1.06, .9); } 85% { transform: scale(.98, 1.03); } }
.ci-spk { opacity: 0; }
.mk-cats.ci-intro .ci-bolt, .mk-cats button:hover .ci-bolt { animation: ci-zap .7s var(--e-out); }
@keyframes ci-zap { 18% { transform: scale(1.22) rotate(-9deg); } 38% { transform: scale(.9) rotate(6deg); } 58% { transform: scale(1.08) rotate(-2deg); } }
.mk-cats.ci-intro .ci-spk, .mk-cats button:hover .ci-spk { animation: ci-spark .7s var(--e-out); }
@keyframes ci-spark { 0% { opacity: 0; transform: scale(.5); } 25% { opacity: 1; transform: scale(1.25); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
.mk-cats.ci-intro .ci-sprout, .mk-cats button:hover .ci-sprout { animation: ci-grow .9s var(--e-spring); transform-origin: 50% 100%; }
@keyframes ci-grow { 0% { transform: scaleY(.55); } 55% { transform: scaleY(1.12); } }
.ci-lf1 { transform-origin: 100% 100%; } .ci-lf2 { transform-origin: 0% 100%; }
.mk-cats.ci-intro .ci-lf1, .mk-cats button:hover .ci-lf1 { animation: ci-sway-l 1s var(--e-out); }
.mk-cats.ci-intro .ci-lf2, .mk-cats button:hover .ci-lf2 { animation: ci-sway-r 1s var(--e-out); }
@keyframes ci-sway-l { 35% { transform: rotate(-16deg); } 70% { transform: rotate(6deg); } }
@keyframes ci-sway-r { 35% { transform: rotate(14deg); } 70% { transform: rotate(-6deg); } }
.mk-cats.ci-intro .ci-hrt, .mk-cats button:hover .ci-hrt { animation: ci-beat .9s var(--e-out); }
@keyframes ci-beat { 14% { transform: scale(1.2); } 28% { transform: scale(.96); } 42% { transform: scale(1.12); } 60% { transform: none; } }
.ci-pulse { stroke-dasharray: 26; }
.mk-cats.ci-intro .ci-pulse, .mk-cats button:hover .ci-pulse { animation: ci-pulse .9s linear; }
@keyframes ci-pulse { from { stroke-dashoffset: 26; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .mk-cats .ci, .mk-cats .ci * { animation: none !important; } }
.mk-opts { grid-area: opts; display: flex; align-items: center; gap: 8px; }
.mk-price { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--paper-2); }
.mk-price button { height: 30px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink-3); transition: background-color .2s, color .2s, box-shadow .2s; }
.mk-price button[aria-pressed="true"] { color: var(--ink); background: var(--sheet); box-shadow: 0 1px 3px rgba(15, 15, 15, .12); }
.mk-sort { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; border-radius: 8px; color: var(--ink-3); transition: background-color .2s; }
.mk-sort:hover { background: var(--hover); }
.mk-sort svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mk-sort select { border: 0; background: none; font-size: 13.5px; font-weight: 550; color: var(--ink-2); cursor: pointer; }
.mk-sort select:focus { outline: none; }
.mk-sort .mn-b { border: 0; background: none; min-height: 28px; padding: 0 4px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.mk-sort .mn-l { left: auto; right: 0; }
.mk-bar .views { border-bottom: 0; }
.mk-bar .view { height: 34px; border-radius: 7px; }
.mk-bar .view[aria-pressed="true"] { background: var(--paper-2); }
.mk-bar .view[aria-pressed="true"]::after { display: none; }
.mk-count { display: flex; align-items: center; gap: 12px; margin: 16px 2px 0; font: 500 12.5px/1 var(--f-mono); color: var(--ink-4); }
.mk-clear, .mk-link { font: 600 13px/1 var(--f-ui); color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

/* --- the cards (on top of notion.css's .tpl) ------------------------------------------------ */
.mk .db { margin-top: 14px; }
.mk .db[data-view="board"] { grid-template-columns: repeat(var(--cols, 4), minmax(170px, 1fr)); }
.mk .db[data-view="gallery"] { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.mk .tpl { cursor: pointer; display: flex; flex-direction: column; }
.mk .tpl[hidden] { display: none !important; }
.mk .tpl:focus-within { box-shadow: var(--sh-lift); }
.mk .tpl.peeked { box-shadow: 0 0 0 2px var(--focus), var(--sh-lift); }
/* the cover leans towards the pointer, with a glint where it is */
.mk .db[data-view="gallery"] .tpl-cover { perspective: 700px; overflow: visible; background: none; padding: 0; }
.mk .db[data-view="gallery"] .tpl-cover img { border-radius: 8px 8px 0 0; transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .5s var(--e-out); }
.mk .db[data-view="gallery"] .tpl:hover .tpl-cover img { transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) scale(1.03); transition-duration: .15s; }
.tpl-cover { position: relative; }
.tpl-glare { position: absolute; inset: 0; border-radius: 8px 8px 0 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .35), transparent 55%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.mk .db[data-view="gallery"] .tpl:hover .tpl-glare { opacity: 1; }
.tpl-badge { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 6px; font: 700 11.5px/1 var(--f-ui); letter-spacing: .02em; box-shadow: 0 4px 10px -4px rgba(25, 25, 24, .35); }
.tpl-fresh { position: absolute; z-index: 2; right: 10px; top: 10px; padding: 4px 8px; border-radius: 5px; font: 600 11.5px/1 var(--f-ui); letter-spacing: .02em; color: #fff; background: #E03E3E; box-shadow: 0 4px 10px -3px rgba(224,62,62,.6); transform: rotate(4deg); }
.tpl-badge.free { color: #1C3829; background: #DBEDDB; }
.tpl-badge.save { color: #fff; background: #D44C47; }
.mk .tpl-body { display: flex; flex-direction: column; flex: 1; gap: 0; padding: 14px 16px 6px; }
.mk .tpl-name { font-size: 15.5px; }
.mk .tpl-props { align-items: center; justify-content: space-between; }
.tpl-price { font-size: 14.5px; color: var(--ink); }
.tpl-price s { margin-right: 3px; font-size: 13px; color: var(--ink-4); }
.tpl-price .fr { color: #2E7D4F; }
.tpl-rate { margin-top: 8px; font-size: 13px; font-weight: 600; color: #B07A1A; }
.tpl-rate small { font-weight: 500; color: var(--ink-4); }
.tpl-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.mk .tpl mark { background: var(--mark); color: inherit; border-radius: 2px; }
/* the card's foot: its price on the left, its one button on the right (like a shelf label and its till) */
.tpl-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding: 12px 12px 12px 16px; border-top: 1px solid var(--line); }
.mk .db[data-view="gallery"] .tpl-props .tpl-price { display: none; }
.tpl-price-b { display: grid; line-height: 1.1; font-size: 17px; }
.tpl-price-b s { margin: 0 0 2px; font-size: 12px; }
.tpl-price-b b { font-weight: 700; letter-spacing: -.01em; }
/* the button: a key with a little depth. Hovered, a shine runs across it, it rises, and its icon plays: a block
   (into the cart) or an arrow (free) drops into the tray, which gives under it; pressed, the key goes down. */
.tpl-get { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; flex: none; height: 38px; padding: 0 12px 0 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 650; color: var(--on-ink); background: var(--ink); box-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 6px 14px -8px rgba(25, 25, 24, .6);
  transition: transform .35s var(--e-spring), box-shadow .3s, background-color .2s; }
.tpl-get::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .26) 50%, transparent 70%); transform: translateX(-120%); }
.tpl-get:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 12px 22px -10px rgba(25, 25, 24, .65); }
.tpl-get:hover::before { transform: translateX(120%); transition: transform .7s var(--e-out); }
.tpl-get:active { transform: translateY(1px); box-shadow: 0 0 0 rgba(0, 0, 0, .35), 0 3px 8px -6px rgba(25, 25, 24, .6); transition-duration: .08s; }
.tg-ic { width: 18px; height: 18px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tg-ic * { transform-box: fill-box; transform-origin: 50% 100%; }
rect.tg-drop { fill: currentColor; fill-opacity: .25; }
.tpl-get:hover .tg-drop { animation: tg-drop .75s var(--e-out); }
.tpl-get:hover .tg-tray { animation: tg-tray .75s var(--e-out); }
@keyframes tg-drop { 0% { transform: translateY(-9px) rotate(-18deg); opacity: 0; } 35% { opacity: 1; } 55% { transform: translateY(3px) scale(1.1, .85); } 72% { transform: translateY(-1.5px) scale(.96, 1.05); } 100% { transform: none; } }
@keyframes tg-tray { 50% { transform: none; } 60% { transform: translateY(1.6px) scaleX(1.08); } 80% { transform: translateY(-.4px); } }
.tg-t { transition: transform .35s var(--e-spring); }
.tpl-get:hover .tg-t { transform: translateX(-1px); }
@media (prefers-reduced-motion: reduce) { .tpl-get:hover .tg-drop, .tpl-get:hover .tg-tray { animation: none; } .tpl-get::before { display: none; } }

/* Explore: anywhere on the card but its button, a glass label comes up over the cover */
.tpl-look { position: absolute; left: 50%; top: 50%; z-index: 3; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 650; color: var(--ink); background: var(--glass); -webkit-backdrop-filter: blur(10px) saturate(1.5); backdrop-filter: blur(10px) saturate(1.5);
  box-shadow: 0 0 0 1px var(--line), 0 12px 28px -10px rgba(15, 15, 15, .45); opacity: 0; transform: translate(-50%, -30%) scale(.92); pointer-events: none;
  transition: opacity .25s, transform .45s var(--e-spring); }
.tpl-look svg { transition: transform .35s var(--e-spring); }
.mk .tpl:hover .tpl-look, .tpl-look:focus-visible { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.mk .tpl:hover .tpl-look svg { transform: translateX(2px); }
.mk .tpl:has(.tpl-get:hover) .tpl-look { opacity: 0; transform: translate(-50%, -30%) scale(.92); }
.mk .db[data-view="gallery"] .tpl-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 8px 8px 0 0; background: rgba(15, 15, 15, .14); opacity: 0; transition: opacity .3s; pointer-events: none; }
.mk .db[data-view="gallery"] .tpl:hover .tpl-cover::after { opacity: 1; }
.mk .db[data-view="gallery"] .tpl:has(.tpl-get:hover) .tpl-cover::after { opacity: 0; }
/* touch screens have no hover: a small Explore stays in the cover's corner */
@media (hover: none) {
  .mk .db[data-view="gallery"] .tpl-look { left: auto; top: auto; right: 10px; bottom: 10px; height: 30px; padding: 0 11px; font-size: 12.5px; opacity: 1; transform: none; pointer-events: auto; }
}
.mk .db:not([data-view="gallery"]) .tpl-look { display: none; }
/* the last card: Notion's "+ New page" */
.tpl-new { display: grid !important; align-content: center; justify-items: start; gap: 12px; min-height: 260px; padding: 22px; background: transparent !important; box-shadow: none !important; border: 1.5px dashed var(--line-2); color: var(--ink-3) !important; transition: background-color .25s, border-color .25s; }
.tpl-new:hover { background: var(--sheet) !important; border-style: solid; }
.tn-plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font-size: 24px; line-height: 1; color: var(--ink-3); background: var(--paper-2); transition: transform .45s var(--e-spring), background-color .2s, color .2s; }
.tpl-new:hover .tn-plus { transform: rotate(90deg); color: var(--on-ink); background: var(--ink); }
.tn-t { display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.tn-t b { font: 500 1.35rem/1.1 var(--f-display); color: var(--ink); }
.tn-go { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.mk .db:not([data-view="gallery"]) .tpl-new { display: none !important; }
/* board and table: the compact cards (the extra parts step out) */
.mk .db:not([data-view="gallery"]) .tpl-line, .mk .db:not([data-view="gallery"]) .tpl-acts, .mk .db:not([data-view="gallery"]) .tpl-badge, .mk .db:not([data-view="gallery"]) .tpl-glare { display: none; }
.mk .db[data-view="board"] .tpl-rate { margin-top: 6px; }
.mk .db[data-view="table"] .tpl-rate { display: none; }
.mk .db[data-view="table"] .tpl { display: grid; }
.mk .db[data-view="table"] .tpl-body { display: contents; }
.mk .db[data-view="board"] .colh[hidden] { display: none; }
.mk .tpl-go { display: none; }
.mk .db[data-view="table"] .tpl-go { display: grid; }
/* nothing found */
.mk-none { margin-top: 18px; padding: 28px; border-radius: 14px; background: var(--sheet); box-shadow: var(--sh-block); color: var(--ink-3); }
.mn-t { font: 500 1.4rem/1.2 var(--f-display); color: var(--ink); margin-bottom: 6px; }
.mk-none .mn-soon, .mk-none.soon .mn-miss { display: none; }
.mk-none.soon .mn-soon { display: block; }

/* --- how it works ----------------------------------------------------------------------- */
.mk-how { margin-top: clamp(56px, 8vw, 96px); }
.mk-how h2 { font: 500 clamp(1.8rem, 3.4vw, 2.6rem)/1.05 var(--f-display); letter-spacing: -.025em; color: var(--ink); }
.mk-how ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.mk-how li { display: grid; gap: 6px; padding: 20px; border-radius: 14px; background: var(--sheet); box-shadow: var(--sh-block); }
.mh-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 600 13px/1 var(--f-ui); color: var(--on-ink); background: var(--ink); }
.mk-how b { margin-top: 6px; font: 500 1.3rem/1.15 var(--f-display); color: var(--ink); }
.mk-how li > span:last-child { font-size: 14.5px; color: var(--ink-3); }

/* --- Side Peek ------------------------------------------------------------------------------ */
html.peeking { overflow: hidden; }
.sp-veil { position: fixed; inset: 0; z-index: 290; background: rgba(15, 15, 15, .2); opacity: 0; transition: opacity .35s; }
.sp-veil.open { opacity: 1; }
.sp { position: fixed; top: 0; right: 0; bottom: 0; z-index: 300; display: flex; flex-direction: column; width: min(540px, 100%); background: var(--sheet); box-shadow: -18px 0 50px -20px rgba(15, 15, 15, .35); transform: translateX(104%); transition: transform .42s var(--e-out); }
.sp.open { transform: none; }
.sp-bar { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sp-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: var(--ink-3); transition: background-color .2s, color .2s; }
.sp-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.sp-btn:disabled { opacity: .35; cursor: default; }
.sp-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sp-pos { margin-left: 6px; font: 500 12px/1 var(--f-mono); color: var(--ink-4); }
.sp-soon { margin-left: auto; font-size: 11.5px; }
.sp-in { flex: 1; overflow: auto; overscroll-behavior: contain; animation: prop-in .35s var(--e-out); }
.sp-cover { padding: 18px 22px 0; }
.sp-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; box-shadow: var(--sh-block); }
.sp-body { padding: 18px 26px 10px; }
.sp-body h2 { font: 500 clamp(1.6rem, 2.6vw, 2.1rem)/1.08 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.sp-h { margin-top: 8px; font: 400 italic 1.1rem/1.4 var(--f-display); color: var(--ink-3); }
.sp-props { margin: 16px -6px 6px; }
.sp-props > div { grid-template-columns: 100px 1fr; }
.sp-props s { color: var(--ink-4); }
.sp-stars { color: #CB912F; letter-spacing: 1px; }
.sp-d { margin-top: 12px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.sp-k { margin-top: 22px; font: 600 12px/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4); }
.sp-f { display: grid; gap: 10px; margin-top: 12px; }
.sp-f li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.sp-f .chk { margin-top: 3px; }
.sp-f b { display: block; font-size: 14.5px; color: var(--ink); }
.sp-f small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.sp-inc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sp-inc li { padding: 5px 9px; border-radius: 6px; font-size: 13px; color: var(--ink-2); background: var(--paper); }
.sp-inc li::before { content: "✓ "; color: #2E7D4F; font-weight: 700; }
.sp-q { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--paper); }
.sp-q blockquote { margin: 0; font: 400 1.05rem/1.45 var(--f-display); color: var(--ink); }
.sp-q figcaption { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.sp-buy { position: sticky; bottom: 0; display: grid; gap: 8px; padding: 14px 22px 18px; background: linear-gradient(transparent, var(--sheet) 22%); }
.sp-get { justify-content: center; height: 50px; font-size: 15.5px; }
.sp-get svg { width: 16px; height: 16px; transition: transform .35s var(--e-spring); }
.sp-get:hover svg { transform: translateX(3px); }
.sp-fine { font-size: 12.5px; text-align: center; color: var(--ink-4); }
.sp-fine a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .mk-bar { grid-template-columns: 1fr; grid-template-areas: "find" "opts" "cats"; }
  .mk-opts { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .mk { padding-top: 28px; }
  .mk-how ol { grid-template-columns: 1fr; }
  .mk-bar .views { display: none; }
  /* Side Peek becomes a sheet from the bottom */
  .sp { top: auto; width: 100%; height: 88vh; border-radius: 18px 18px 0 0; transform: translateY(104%); }
  .sp.open { transform: none; }
}

/* on a laptop or wider, the header sits in two columns, so the search and the first templates show without scrolling */
@media (min-width: 1000px) {
  .mk-head { max-width: none; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "icon icon" "crumb crumb" "title lede" "title props"; column-gap: clamp(28px, 4vw, 64px); align-items: end; }
  .mk-icon { grid-area: icon; } .mk-crumb { grid-area: crumb; } .mk-head h1 { grid-area: title; align-self: start; } .mk-lede { grid-area: lede; margin-top: 8px; } .mk-props { grid-area: props; }
}
