/* ClockLap blog (clocklap.com/blog): pages are rendered by the Canada API and use chrome.css + site.css + this file.
   Same calm monochrome with one champagne accent; long-form reading type for posts. No inline styles anywhere
   (the blog's Content-Security-Policy refuses them). */

/* ---------------------------------------------------------------- index */
.bhero { padding: clamp(132px, 15vw, 188px) 0 clamp(40px, 5vw, 64px); }
.bhero h1 { font-size: clamp(40px, 6vw, 84px); line-height: 1; letter-spacing: -0.035em; max-width: 16ch; }
.bhero .lede { margin-top: 22px; }
.bhero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.feed-link { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--mono); letter-spacing: .04em; color: var(--fg-3); text-decoration: none; padding: 10px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); transition: color .15s, box-shadow .15s; }
.feed-link:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-3); }
.feed-link svg { width: 14px; height: 14px; color: var(--accent); }

.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.tagbar a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; color: var(--fg-2); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, color .2s, box-shadow .2s; }
.tagbar a:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-3); }
.tagbar a[aria-current="page"] { background: var(--fg); color: var(--bg); box-shadow: none; }
@media (max-width: 640px) { .tagbar { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; } .tagbar::-webkit-scrollbar { display: none; } .tagbar a { flex: none; } }
.tagbar a .n { font: 500 11px/1 var(--mono); color: var(--fg-3); }
.tagbar a[aria-current="page"] .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.posts { padding-bottom: clamp(80px, 10vw, 140px); }
.lead-post { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; text-decoration: none; color: inherit; padding-bottom: clamp(40px, 5vw, 64px); margin-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.lead-post h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.06; letter-spacing: -0.03em; margin-top: 16px; }
.lead-post p { color: var(--fg-2); font-size: 18px; margin-top: 18px; max-width: 52ch; }
.lead-post .meta { margin-top: 24px; }
@media (max-width: 860px) { .lead-post { grid-template-columns: minmax(0, 1fr); } }

.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 32px); }
@media (max-width: 1000px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pgrid { grid-template-columns: minmax(0, 1fr); } }
.pcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.pcard h3 { font-size: 22px; line-height: 1.22; letter-spacing: -0.018em; margin-top: 16px; transition: color .2s; }
.pcard .ptags { margin-top: 18px; }
.pcard .ptags + h3 { margin-top: 10px; }
.pcard p { color: var(--fg-2); font-size: 15.5px; line-height: 1.55; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .meta { margin-top: 16px; }
.pcard:hover h3, .lead-post:hover h2 { color: var(--accent); }

.cover { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pcard:hover .cover img, .lead-post:hover .cover img { transform: scale(1.03); }
.lead-post .cover { border-radius: 30px; }
/* No cover: a quiet monogram card in the site's black, so the grid stays even. */
.cover.blank { background: var(--card); box-shadow: none; display: grid; place-items: center; }
.cover.blank span { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.03em; color: #fff; padding: 0 12%; text-align: center; line-height: 1.1; }
.cover.blank::after { content: ""; position: absolute; right: 18px; bottom: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pcard .cover.blank span { font-size: 22px; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font: 500 12.5px/1.2 var(--mono); letter-spacing: .03em; color: var(--fg-3); }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-3); opacity: .7; }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: clamp(48px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--line); }
.pager .where { font: 500 12.5px/1 var(--mono); color: var(--fg-3); letter-spacing: .04em; }
.empty { padding: 72px 0 24px; color: var(--fg-2); font-size: 18px; }

/* ---------------------------------------------------------------- post */
.phead { padding: clamp(128px, 14vw, 176px) 0 0; }
.phead .inner { max-width: 720px; margin: 0 auto; }
.crumbs.lite { color: var(--fg-3); margin-bottom: 24px; }
.crumbs.lite a { color: var(--fg-2); }
.crumbs.lite a:hover { color: var(--fg); }
.phead h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.03; letter-spacing: -0.035em; }
.phead .dek { margin-top: 22px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--fg-2); max-width: 62ch; }
.phead .meta { margin-top: 28px; }
.phead .byline { color: var(--fg-2); }
.hero-cover { max-width: 1240px; margin: clamp(36px, 5vw, 64px) auto 0; padding-inline: var(--gutter); }
.hero-cover img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: cover; border-radius: 30px; background: var(--bg-2); }
.hero-cover figcaption { font-size: 13.5px; color: var(--fg-3); margin-top: 12px; text-align: center; }

.pbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); gap: 0 40px; padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(64px, 8vw, 112px); max-width: 1320px; margin: 0 auto; }
.pbody > .prose { grid-column: 2; min-width: 0; }
.toc { grid-column: 3; align-self: start; position: sticky; top: 104px; font-size: 14px; max-width: 260px; }
.toc h2 { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: grid; gap: 9px; }
.toc a { color: var(--fg-2); text-decoration: none; line-height: 1.35; display: block; transition: color .15s; }
.toc a:hover { color: var(--fg); }
.toc .l3 { padding-left: 12px; font-size: 13.5px; }
.toc-inline { display: none; margin-bottom: 36px; padding: 20px 22px; border-radius: 20px; background: var(--bg-2); }
.toc-inline summary { cursor: pointer; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); list-style: none; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline ol { margin: 16px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.toc-inline a { color: var(--fg-2); text-decoration: none; }
@media (max-width: 1180px) { .pbody { grid-template-columns: minmax(0, 1fr); max-width: 768px; } .pbody > .prose { grid-column: 1; } .toc { display: none; } .toc-inline { display: block; } }

.prose { font-size: 18.5px; line-height: 1.72; color: var(--fg-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2, .prose h3, .prose h4 { color: var(--fg); scroll-margin-top: 104px; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.18; letter-spacing: -0.022em; margin-top: 2em; }
.prose h3 { font-size: 22px; line-height: 1.3; letter-spacing: -0.012em; margin-top: 1.7em; }
.prose h4 { font-size: 18.5px; font-weight: 500; margin-top: 1.5em; }
.prose h1 { font-size: 34px; color: var(--fg); letter-spacing: -0.025em; }
.prose p, .prose li { text-wrap: pretty; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { color: var(--fg); text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.prose a:hover { text-decoration-color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--accent); color: var(--fg); font-size: 21px; line-height: 1.55; letter-spacing: -0.01em; }
.prose blockquote p + p { margin-top: .8em; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.6em 0; }
.prose img { display: block; width: 100%; height: auto; border-radius: 20px; margin: 2em 0; background: var(--bg-2); }
.prose p > img { margin: .8em 0; }
.prose code { font: 0.86em/1.5 var(--mono); background: var(--bg-2); color: var(--fg); padding: 2px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.prose pre { background: #0B0B0D; color: #E7E7EA; border-radius: 18px; padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.65; box-shadow: inset 0 0 0 1px #222226; }
.prose pre code { background: none; box-shadow: none; padding: 0; color: inherit; font-size: inherit; }
.prose .table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--fg); font-weight: 500; background: var(--bg-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose .al-center { text-align: center; } .prose .al-right { text-align: right; }
.prose .img-missing { font-style: italic; color: var(--fg-3); }

.pfoot { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.pfoot .ptags { padding-top: 28px; border-top: 1px solid var(--line); }
.pfoot .back { margin-top: 28px; }
.pfoot .back .textlink { color: var(--fg); }
.pfoot .back svg { width: 15px; height: 15px; flex: none; }
a.tag { text-decoration: none; transition: color .15s, box-shadow .15s; }
a.tag:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg-3); }

.related { padding: clamp(72px, 9vw, 120px) 0; }
.related h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.025em; margin-bottom: clamp(28px, 3vw, 44px); }

.cta-lite { margin: clamp(56px, 7vw, 88px) auto 0; max-width: 720px; padding: clamp(28px, 4vw, 44px); border-radius: 30px; background: var(--card); color: var(--on-black); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; box-shadow: inset 0 0 0 1px var(--card-edge, transparent); }
.cta-lite h2 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; max-width: 20ch; }
.cta-lite p { color: var(--on-black-2); margin-top: 8px; font-size: 15.5px; }
.cta-lite .pill { --h: 48px; font-size: 15px; }

.preview-bar { position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: var(--accent); color: #14161C; font: 500 13px/1.2 var(--mono); letter-spacing: .03em; box-shadow: 0 12px 30px -12px rgb(0 0 0 / .4); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .cover img, .pcard h3 { transition: none; } .pcard:hover .cover img, .lead-post:hover .cover img { transform: none; } }
