/* Sketches: /sketches hub, /sketches/{slug} and the generated sketch pages. The sketchbook page is warm paper with a
   faint grid, spiral rings across the top, handwriting in Caveat; site ink #0B1533, blue #1463FF, mint, amber, violet. */
.skx-main { --s-ink: #0b1533; --s-blue: #1463ff; --s-mint: #6ff0bc; --s-mint-ink: #0e9f6e; --s-amber: #c77a00; --s-violet: #7a3cf0; --s-line: #dbe2ee; --s-paper: #fbf6e9; --s-hand: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; }
.skx-main h2, .skx-main h3 { font-family: var(--display); letter-spacing: -0.01em; }

/* ---------- the sketchbook figure ---------- */
.skb { margin: 0; min-width: 0; }
.skb-book { position: relative; padding-top: 12px; }
.skb-rings { position: absolute; top: 0; left: 7%; right: 7%; display: flex; justify-content: space-between; pointer-events: none; z-index: 2; }
.skb-rings i { width: 9px; height: 22px; border-radius: 6px; background: linear-gradient(90deg, #8f959c, #eef1f4 45%, #8f959c); box-shadow: 0 2px 3px rgba(11, 21, 51, 0.35); }
.skb-page { position: relative; border-radius: 6px 6px 10px 10px; background: var(--s-paper); box-shadow: inset 0 0 46px rgba(160, 120, 60, 0.16), 0 1px 0 #e8dcc0, 0 3px 0 #f3ead5, 0 5px 0 #e5d8ba, 0 14px 30px rgba(11, 21, 51, 0.14); padding: 26px 3% 3%; overflow: hidden; }
.skb-page::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: radial-gradient(rgba(140, 110, 60, 0.10) 0.7px, transparent 0.9px); background-size: 5px 5px; }
.skb-head { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #2c3044; font: 700 clamp(19px, 2.3vw, 28px)/1.1 var(--s-hand); margin: 0 0 4px; }
.skb-head b { min-width: 0; padding-right: .2em; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 2px solid rgba(214, 75, 59, 0.45); }
.skb-head span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7em; color: #8a7a66; }
.skb-sheet { position: relative; aspect-ratio: 100 / 70; background-color: #fdf9ef; background-image: linear-gradient(rgba(110, 145, 190, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 145, 190, 0.12) 1px, transparent 1px); background-size: 5% 7.142857%; border-radius: 2px; }
.skb-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.skb-wash { mix-blend-mode: multiply; }
.skb-text { font-family: var(--s-hand, 'Caveat', cursive); font-weight: 600; }
.skb-pencil { position: absolute; width: 38px; height: 38px; margin: -35px 0 0 -3px; pointer-events: none; filter: drop-shadow(1px 3px 2px rgba(11, 21, 51, 0.3)); z-index: 3; }
.skb-pencil svg { width: 100%; height: 100%; display: block; }
.skb-pencil[hidden] { display: none; }

.skb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 12px; }
.skb-stage { margin: 0; min-width: 0; flex: 1 1 240px; font: 700 clamp(17px, 2vw, 21px)/1.25 var(--s-hand); color: #5a4a3a; }
.skb.is-drawing .skb-stage { color: var(--s-blue); }
.skb-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.skb-controls[hidden] { display: none; }
.skb-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--s-line); background: #fff; color: var(--s-ink); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.skb-btn:hover { border-color: rgba(20, 99, 255, .5); }
.skb-btn svg { width: 17px; height: 17px; }
.skb-btn--main { background: var(--s-ink); border-color: var(--s-ink); color: #fff; }
.skb-btn--main:hover { background: #13224a; }
.skb-stages { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: stg; }
.skb-stages li { counter-increment: stg; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 5px; border-radius: 999px; background: #fff; border: 1px solid var(--s-line); color: #4a556b; font-size: 13px; font-weight: 600; }
.skb-stages li::before { content: counter(stg); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #f1ead8; color: #6a5636; font-size: 11.5px; font-weight: 800; }
.skb-stages li.is-done::before { background: var(--s-mint); color: #053d2b; }
.skb-stages li.is-now { border-color: var(--s-blue); color: var(--s-ink); }
.skb-stages li.is-now::before { background: var(--s-blue); color: #fff; }

/* ---------- a sketch page ---------- */
.skx-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.skx-hero .eyebrow img { border-radius: 6px; background: #fff; padding: 2px; }
.skx-hero h1 { max-width: 920px; }
.skx-hero-meta { margin: 8px 0 0; font-size: 14px; color: #c9d3ea; }
.skx-hero-meta a { color: #6ff0bc; }
.skx-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.skx-side { display: grid; gap: 14px; min-width: 0; }
.skx-box { background: #fff; border: 1px solid var(--s-line); border-radius: 20px; padding: 18px 20px; min-width: 0; }
.skx-box h2 { font-size: 20px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.skx-box h3 { font-size: 17px; margin: 16px 0 6px; }
.skx-box p { margin: 0 0 10px; line-height: 1.65; color: #2f3a50; }
.skx-box p:last-child { margin-bottom: 0; }
.skx-box ul { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; color: #2f3a50; }
.skx-box li { margin: 3px 0; }
.skx-points { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.skx-points li { position: relative; padding-left: 26px; }
.skx-points li::before { content: ""; position: absolute; left: 0; top: 5px; width: 15px; height: 15px; border-radius: 5px; background: var(--s-mint); box-shadow: inset 0 0 0 4px #d6fbe9; }
.skx-facts { display: grid; gap: 10px; margin: 0; }
.skx-facts > div { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: 10px; padding-bottom: 9px; border-bottom: 1px dashed var(--s-line); }
.skx-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.skx-facts dt { font-size: 13px; font-weight: 800; color: #657086; text-transform: uppercase; letter-spacing: .04em; }
.skx-facts dd { margin: 0; color: var(--s-ink); font-weight: 600; overflow-wrap: anywhere; }
.skx-real { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.skx-real li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.skx-real img { border-radius: 7px; background: #f5f7fb; border: 1px solid var(--s-line); padding: 3px; box-sizing: border-box; }
.skx-real strong a { color: var(--s-ink); }
.skx-real span { display: block; font-size: 13.5px; color: #4a556b; line-height: 1.45; }
.skx-note { font-size: 13.5px !important; color: #657086 !important; }
.skx-links { list-style: none; padding: 0 !important; margin: 0 !important; display: grid; gap: 7px; }
.skx-links a { font-weight: 700; }
.skx-links span { color: #657086; font-size: 13px; }
.skx-after { margin-top: 28px; }

/* ---------- cards and the hub ---------- */
.skx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 16px; }
.skx-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 16px; border-radius: 20px; border: 1px solid var(--s-line); background: #fff; color: var(--s-ink); text-decoration: none; min-width: 0; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.skx-card:hover { border-color: rgba(20, 99, 255, .45); box-shadow: 0 12px 26px rgba(16, 24, 40, .08); transform: translateY(-2px); }
.skb-thumb { display: block; position: relative; aspect-ratio: 100 / 70; border-radius: 12px; background-color: var(--s-paper, #fbf6e9); background-image: linear-gradient(rgba(110, 145, 190, 0.10) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 145, 190, 0.10) 1px, transparent 1px); background-size: 5% 7.142857%; box-shadow: inset 0 0 26px rgba(160, 120, 60, 0.16); overflow: hidden; }
.skb-thumb .skb-svg { inset: 4%; width: 92%; height: 92%; }
.skx-card strong { font-family: var(--display); font-size: 18px; line-height: 1.25; padding: 0 4px; }
.skx-card span.skx-card-sum { color: #4a556b; font-size: 14.5px; line-height: 1.5; padding: 0 4px; }
.skx-card .skx-card-topic { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--s-amber); padding: 0 4px; }
.skx-feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 22px; }
.skx-feature-text h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 8px; }
.skx-feature-text p { line-height: 1.65; color: #2f3a50; margin: 0 0 14px; }
.skx-topic { margin-top: 30px; }
.skx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.skx-chips a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; min-height: 38px; border-radius: 999px; border: 1px solid var(--s-line); background: #fff; color: var(--s-ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.skx-chips a:hover { border-color: rgba(20, 99, 255, .45); }
.skx-chips small { color: #657086; font-weight: 600; }
.skx-chips img { border-radius: 4px; }
.skx-browse { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-top: 30px; }
.skx-browse .skx-box { display: flex; flex-direction: column; gap: 10px; }
.skx-browse .skx-chips { max-height: 330px; overflow: auto; padding: 2px; }
.skx-search { display: flex; gap: 8px; flex-wrap: wrap; }
.skx-search input { flex: 1 1 200px; min-width: 0; font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--s-line); border-radius: 12px; background: #fff; }
.skx-search button { font: inherit; font-weight: 700; padding: 11px 16px; border: 0; border-radius: 12px; background: var(--s-ink); color: #fff; cursor: pointer; }
.skx-results { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.skx-results a { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.skx-results small { color: #657086; font-weight: 600; }

@media (max-width: 900px) {
  .skx-layout, .skx-feature { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .skb-page { padding: 20px 2.5% 2.5%; }
  .skb-rings i { width: 7px; height: 17px; }
  .skb-btn { padding: 7px 11px; font-size: 13.5px; }
  .skx-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media print {
  .skb-controls, .skb-pencil { display: none !important; }
}
.skb-thumb img { position: absolute; inset: 4%; width: 92%; height: 92%; display: block; }
