/* The blog's look (pages made by src/worker/services/blog.js): the app's colours and fonts, light and dark. */
:root {
  --bg: #f3f8f6; --surface: #ffffff; --surface-2: #e2edea; --line: #cbdad6;
  --ink: #0e222b; --muted: #4b656c;
  --sea: #0d6b67; --sea-ink: #ffffff; --sea-soft: #d0e9e5;
  --coral: #b03a24; --coral-soft: #fadfd5; --ok: #1f7a3d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1820; --surface: #0e1f27; --surface-2: #142b34; --line: #22404a;
    --ink: #e3eeec; --muted: #93aab0;
    --sea: #4cc2b8; --sea-ink: #04211f; --sea-soft: #0f3a39;
    --coral: #ff7e5f; --coral-soft: #3a1d16; --ok: #6fd391;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 "Figtree", "Segoe UI", system-ui, sans-serif; }
a { color: var(--sea); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 10px 16px; border-radius: 12px; z-index: 10; }
.skip:focus { left: 16px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.narrow { max-width: 760px; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 800 21px "Bricolage Grotesque", system-ui, sans-serif; min-height: 44px; }
.brand img { border-radius: 10px; }
.brand b { color: var(--sea); font-weight: inherit; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav > a:not(.btn) { color: var(--ink); font-weight: 700; text-decoration: none; padding: 10px 12px; border-radius: 999px; }
.top nav > a:not(.btn):hover { background: var(--surface-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--sea); color: var(--sea-ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.big { min-height: 52px; padding: 0 24px; font-size: 1.05rem; }
.link { font-weight: 700; }

main { padding: 28px 0 64px; }
.hero { padding: 24px 0 28px; display: grid; gap: 10px; max-width: 720px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.eyebrow { color: var(--coral); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.lead { color: var(--muted); font-size: 1.12rem; }
.meta { color: var(--muted); font-size: 0.92rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.post-card { display: grid; gap: 8px; align-content: start; transition: border-color 0.2s, transform 0.2s; position: relative; }
.post-card:hover { border-color: var(--sea); transform: translateY(-2px); }
.post-card h2, .post-card h3 { font-size: 1.3rem; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.post-card p:not(.tags):not(.meta) { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { background: var(--sea-soft); color: var(--ink); font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.crumbs { font-size: 0.92rem; color: var(--muted); margin-bottom: 16px; }
.post > header { display: grid; gap: 12px; margin-bottom: 24px; }
.post h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); overflow-wrap: anywhere; }
.toc { margin-bottom: 28px; }
.toc h2 { font-size: 1.05rem; margin-bottom: 8px; }
.toc ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }

.prose { display: grid; gap: 18px; overflow-wrap: break-word; }
.prose h2 { font-size: 1.6rem; margin-top: 18px; }
.prose h3 { font-size: 1.25rem; margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.prose blockquote { margin: 0; padding: 14px 18px; border-left: 4px solid var(--sea); background: var(--sea-soft); border-radius: 0 14px 14px 0; }
.prose strong { font-weight: 700; }

.book { margin-top: 40px; padding: 26px; border-radius: 24px; background: linear-gradient(135deg, var(--sea-soft), var(--surface) 70%); border: 1px solid var(--line); display: grid; gap: 14px; }
.book h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.camps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.camps a { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
.camps a:hover { border-color: var(--sea); }
.camps span { color: var(--muted); font-size: 0.95rem; }
.camps .ok { color: var(--ok); font-weight: 700; }
.camps .full { color: var(--coral); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }

.more { margin-top: 48px; display: grid; gap: 16px; }
.more h2 { font-size: 1.5rem; }

.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { padding-top: 24px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; color: var(--muted); font-size: 0.95rem; }

@media (max-width: 480px) {
  body { font-size: 16.5px; }
  .top nav > a:not(.btn) { padding: 10px 8px; }
  .btn { padding: 0 14px; }
  .book { padding: 20px; }
  .actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card { transition: none; }
  .post-card:hover { transform: none; }
}
