/* The blog (web/blog/, generated by tool/blog.dart): anemone's layout in the portfolio's look. It loads after style.css
   and site.css, which style the notch (the home page's markup, driven by BlogPageEngine), the theme's circle reveal and
   blueprint's blue layer; this file is the rest. Code is coloured at build time into .t-* classes (CodeHighlighter):
   a neutral palette on light, Gruvbox on dark. */

:root{
  --bg:#FFFFFF;--ink:#151922;--soft:#3A4150;--mute:#7A8292;--line:#E7E9EF;--dash:#AEB5C2;--wash:#F6F7FA;
  --acc:#7C3AED;--acc-wash:rgba(124,58,237,.07);--link:#2F6BFF;--link-line:rgba(47,107,255,.55);
  /* light code: the page's paper with a hairline, and distinct hues (all 4.5:1 or better on the background) */
  --code-bg:#F6F7F9;--code-ink:#1F2328;--code-line:#E3E6EC;--code-mute:#5F6873;
  --t-k:#7C3AED;--t-s:#116329;--t-t:#0550AE;--t-f:#0E6E7E;--t-n:#B4410C;--t-l:#CF222E;--t-o:#CF222E;--t-a:#953800;
  --t-e:#0A3069;--t-p:#1F2328;--t-v:#0550AE;--t-c:#5F6873;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --hand:'Caveat','Comic Sans MS',cursive;
  /* style.css sets these on .wall; the notch's transitions need them here */
  --out:cubic-bezier(.2,.8,.2,1);--spring:cubic-bezier(.3,1.5,.5,1);
  color-scheme:light;
}
html[data-theme=dark]{
  --bg:#12151B;--ink:#ECEFF5;--soft:#C5CBD8;--mute:#7D8597;--line:#262B36;--dash:#4B5468;--wash:#181C24;
  --acc:#A78BFA;--acc-wash:rgba(167,139,250,.09);--link:#8AB0FF;--link-line:rgba(138,176,255,.55);
  --code-bg:#1D2021;--code-ink:#EBDBB2;--code-line:#32302F;--code-mute:#928374;
  --t-k:#FB4934;--t-s:#B8BB26;--t-t:#FABD2F;--t-f:#83A598;--t-n:#D3869B;--t-l:#D3869B;--t-o:#FE8019;--t-a:#8EC07C;
  --t-e:#FE8019;--t-p:#EBDBB2;--t-v:#8EC07C;--t-c:#928374;
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:24px}
html,body{margin:0;background:var(--bg);color:var(--ink)}
body{font:400 15px/1.75 var(--mono);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  transition:background-color .3s ease,color .3s ease}
::selection{background:var(--acc);color:var(--bg)}
a{color:inherit}
:focus-visible{outline:2px solid #2F6BFF;outline-offset:2px;border-radius:4px}

.bpage{width:100%;max-width:760px;margin:0 auto;padding:0 20px;min-height:100vh;display:flex;flex-direction:column}
.bmain{flex:1;padding-top:104px}

/* ---------- shared bits ---------- */
h1{margin:0 0 .5em;font-size:clamp(26px,5.4vw,36px);line-height:1.2;font-weight:800;letter-spacing:-.025em;text-wrap:balance}
.acc{color:var(--acc)}
.hand{font-family:var(--hand);font-size:1.45em;font-weight:600;line-height:1;letter-spacing:0}
.crumb{margin-bottom:18px;color:var(--mute);font-size:13px}
.crumb a{color:var(--acc);text-decoration:none;padding:1px 2px;margin:0 -2px;border-radius:5px;transition:background-color .2s}
.crumb a:hover{background:var(--acc-wash)}

/* ---------- the list: date, then title, one row per post ---------- */
.bsub{margin:-4px 0 28px;color:var(--mute);font-size:13px}
.bsub a{color:var(--acc)}
.plist,.tlist{margin:0;padding:0;list-style:none}
.plist li{display:flex;gap:20px;align-items:baseline;padding:12px 10px;margin:0 -10px;border-bottom:1px dashed var(--line);
  border-radius:10px;transition:background-color .2s}
.plist li:hover{background:var(--wash)}
.plist time{flex:none;color:var(--mute);font-size:13px;font-variant-numeric:tabular-nums}
.plist a{font-weight:600;text-decoration:none;transition:color .2s}
.plist a::after{content:" →";color:var(--acc);opacity:0;transition:opacity .2s}
.plist li:hover a{color:var(--acc)}
.plist li:hover a::after{opacity:1}
.pcount{margin:18px 0 0;color:var(--mute);font-size:12px}
.bempty{color:var(--mute)}
.tlist{display:flex;flex-wrap:wrap;gap:10px}
.tlist li{display:flex}
.tlist a,.ptags a{display:inline-block;padding:4px 12px;border:1px solid var(--line);border-radius:999px;font-size:13px;
  text-decoration:none;transition:color .2s,border-color .2s,background-color .2s}
.tlist a:hover,.ptags a:hover{color:var(--acc);border-color:var(--acc);background:var(--acc-wash)}
.tn{align-self:center;margin-left:6px;color:var(--mute);font-size:12px}

/* ---------- a post: path, date, author, title, resources, contents, body, tags ---------- */
.phead{margin-bottom:28px}
.pmeta{display:block;color:var(--mute);font-size:13px;font-style:normal;line-height:1.9}
.phead h1{margin-top:14px}
/* the path, date and author, with the resources box beside them (under them when there is no room) */
.ptop{display:flex;justify-content:space-between;align-items:flex-start;gap:14px 24px}
.pinfo{flex:none}
/* Back: the home page's button (style.css .pjback), here in the flow above the path (posts, tag pages), and on phones too */
.bmain .pjback{position:static;display:inline-flex;margin:0 0 16px;text-decoration:none}
/* resources: a dashed box, like the table of contents below it */
.pres{flex:0 1 auto;min-width:0;max-width:300px;margin:0;padding:10px 14px 9px;border:1px dashed var(--dash);border-radius:12px}
.pres b{display:block;margin:0 0 4px;color:var(--mute);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.pres ul{margin:0;padding:0;list-style:none}
.pres li{position:relative;padding-left:18px;font-size:13px;line-height:1.7}
/* a corner-down-right arrow with a rounded bend, in the accent colour */
.pres li::before{content:"";position:absolute;left:0;top:.36em;width:12px;height:12px;background:var(--acc);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4v7a4 4 0 0 0 4 4h11'/%3E%3Cpath d='M15 10l5 5-5 5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4v7a4 4 0 0 0 4 4h11'/%3E%3Cpath d='M15 10l5 5-5 5'/%3E%3C/svg%3E") center/contain no-repeat}
.toc{margin:0 0 36px;padding:16px 20px;border:1px dashed var(--dash);border-radius:14px}
.toc h2{margin:0 0 8px;color:var(--mute);font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.toc ul{margin:0;padding:0;list-style:none}
.toc li{position:relative;padding-left:18px;font-size:14px}
.toc li::before{content:"→";position:absolute;left:0;color:var(--acc)}
.toc li.l3{margin-left:18px}
.toc li.l3::before{content:"·"}
.toc a{text-decoration:none;transition:color .2s}
.toc a:hover{color:var(--acc)}
.ptags{display:flex;flex-wrap:wrap;gap:8px;margin-top:44px;padding-top:24px;border-top:1px dashed var(--line)}

/* ---------- the markdown ---------- */
.prose{overflow-wrap:break-word}
.prose>*:first-child{margin-top:0}
.prose p,.prose ul,.prose ol,.prose table,.prose blockquote,.prose .code{margin:0 0 1.15em}
.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{position:relative;margin:2.1em 0 .7em;line-height:1.35;font-weight:800;letter-spacing:-.015em;text-wrap:balance}
.prose h2{font-size:clamp(19px,3.4vw,22px)}
.prose h3{font-size:17px}
.prose h4,.prose h5,.prose h6{font-size:15px}
.prose .hash{margin-right:.45em;color:var(--acc);text-decoration:none;font-weight:400;opacity:.75;transition:opacity .2s}
.prose :is(h2,h3,h4,h5,h6):hover .hash{opacity:1}
.prose a.u{color:var(--link)}
/* links in text: a dashed underline (like the home page's credits), solid in the accent on hover */
.prose a.u,.pres a,.bsub a,.bfoot a{text-decoration:underline dashed;text-decoration-thickness:1px;text-underline-offset:4px;
  transition:color .2s,text-decoration-color .2s}
.prose a.u{text-decoration-color:var(--link-line)}
.pres a,.bsub a,.bfoot a{text-decoration-color:color-mix(in srgb,currentColor 50%,transparent)}
.prose a.u:hover,.pres a:hover,.bsub a:hover,.bfoot a:hover{color:var(--acc);text-decoration-style:solid;text-decoration-color:currentColor}
.prose strong{font-weight:700}
.prose ul,.prose ol{padding-left:1.4em}
.prose li{margin:.25em 0}
.prose li::marker{color:var(--acc)}
.prose hr{margin:2.4em 0;border:0;border-top:1px dashed var(--line)}
.prose code,.toc code{font-family:var(--mono)}
.prose :not(pre)>code,.toc code{padding:.12em .38em;border-radius:6px;background:var(--acc-wash);color:var(--ink);font-size:.88em}
.prose blockquote{margin-left:0;margin-right:0;padding:.7em 1.1em;border-left:3px solid var(--acc);border-radius:0 12px 12px 0;
  background:var(--acc-wash);color:var(--soft)}
.prose blockquote p{margin:0}
.prose blockquote p+p{margin-top:.6em}
.prose img{display:block;max-width:100%;height:auto;margin:1.6em auto;border:1px solid var(--line);border-radius:14px;background:var(--wash)}
.prose p>img:only-child{margin:0 auto}
.prose table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:13.5px}
.prose th,.prose td{padding:7px 12px;border:1px solid var(--line);text-align:left}
.prose th{background:var(--wash)}
.prose input[type=checkbox]{accent-color:var(--acc);margin-right:.4em}
/* code blocks: Gruvbox, with the language and a copy button (blog.js) */
.prose .code{position:relative;border-radius:14px;background:var(--code-bg);color:var(--code-ink);border:1px solid var(--code-line)}
.prose pre{margin:0;padding:20px 20px 18px;overflow-x:auto;font:400 13.5px/1.65 var(--mono);tab-size:2;-webkit-overflow-scrolling:touch}
.prose pre code{font:inherit;background:none;padding:0}
.code .lang{position:absolute;top:8px;right:12px;color:var(--code-mute);font-size:11px;letter-spacing:.06em;text-transform:uppercase;
  pointer-events:none;transition:opacity .2s}
.code .copy{position:absolute;top:6px;right:8px;padding:3px 9px;border:1px solid var(--code-line);border-radius:7px;background:var(--code-bg);
  color:var(--code-mute);font:500 11px/1.4 var(--mono);cursor:pointer;opacity:0;transition:opacity .2s,color .2s}
.code:hover .copy,.code .copy:focus-visible,.code .copy.done{opacity:1}
.code:hover .lang,.code:focus-within .lang{opacity:0}
.code .copy:hover,.code .copy.done{color:var(--code-ink)}
@media (hover:none){.code .copy{opacity:1}.code .lang{display:none}}
.t-k{color:var(--t-k)}.t-s{color:var(--t-s)}.t-t{color:var(--t-t)}.t-f{color:var(--t-f)}.t-n{color:var(--t-n)}.t-l{color:var(--t-l)}
.t-o{color:var(--t-o)}.t-a{color:var(--t-a)}.t-e{color:var(--t-e)}.t-p{color:var(--t-p)}.t-v{color:var(--t-v)}.t-c{color:var(--t-c);font-style:italic}
/* footnotes and GitHub alerts (> [!NOTE]) */
.prose .footnote-ref a{color:var(--acc);text-decoration:none;font-size:.8em}
.prose .footnotes{margin-top:3em;padding-top:1em;border-top:1px dashed var(--line);color:var(--soft);font-size:13px}
.prose .footnote-backref{color:var(--acc);text-decoration:none}
.prose .markdown-alert{padding:.7em 1.1em;border-left:3px solid var(--al,var(--acc));border-radius:0 12px 12px 0;background:var(--wash)}
.prose .markdown-alert>:last-child{margin-bottom:0}
.prose .markdown-alert-title{margin:0 0 .3em;color:var(--al,var(--acc));font-weight:700;text-transform:capitalize}
.prose .markdown-alert-tip{--al:#2E9E5B}.prose .markdown-alert-important{--al:var(--acc)}
.prose .markdown-alert-warning{--al:#C27B0A}.prose .markdown-alert-caution{--al:#D7263D}.prose .markdown-alert-note{--al:var(--link)}

/* ---------- footer ---------- */
.bfoot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px;margin-top:80px;padding:20px 0 32px;
  border-top:1px solid var(--line);color:var(--mute);font-size:12px}
.bfoot a{color:var(--ink)}

/* ---------- phones ---------- */
@media (max-width:560px){
  body{font-size:14px}
  .bpage{padding:0 16px}
  .bmain{padding-top:88px}
  .plist li{flex-direction:column;gap:2px}
  .ptop{gap:12px}
  .pres{padding:8px 12px 7px}
  .prose pre{padding:16px 16px 14px;font-size:12.5px}
  .prose .code{margin-left:-6px;margin-right:-6px}
}

/* ---------- blueprint (BlueprintEngine with BlueprintScope.blog): the page goes white on blue like the home page's wall ---------- */
html[data-blueprint] body{background:#0B3B8C}
html[data-blueprint] .bpage{filter:grayscale(1) invert(1) contrast(1.15)}
html[data-blueprint][data-theme=dark] .bpage{filter:grayscale(1) contrast(1.15)}
html[data-blueprint] .bpage *:not(svg *):not(.notch,.notch *){box-shadow:none !important;text-shadow:none !important}

@media (max-width:360px){.ptop{flex-wrap:wrap}}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
