/* Snug — default theme: its shell. Colours, type, the header and the footer.
   The parts every theme shares (posts, galleries, comments, footnotes …) are in components.css, which the
   layout loads before this file.
   Colours are CSS custom properties: override them in Settings → Appearance (accent, background, text)
   or with Custom CSS. Light/dark follows the system unless the visitor picks one with the toggle. */
:root{
  color-scheme:light;
  --paper:#F6F9E8;
  --paper-2:#EEF4D6;
  --surface:#FFFFFF;
  --ink:#281829;
  --ink-2:#6B5E6D;
  --rule:rgba(40,24,41,.12);
  --accent:#35203A;
  --on-accent:#C9E265;
  --halo:var(--paper);
  --font-body:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  --font-head:var(--font-body);
  --font-mono:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  --maxw:44rem;
  --gut:max(16px,env(safe-area-inset-left,0px));
  --radius:14px;
  --ease:cubic-bezier(.2,.7,.2,1);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#1E1222;--paper-2:#271A2B;--surface:#2C1F31;--ink:#EEF3D8;--ink-2:#B3A7B6;--rule:rgba(238,243,216,.13);
    --accent:#C9E265;--on-accent:#35203A;color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --paper:#1E1222;--paper-2:#271A2B;--surface:#2C1F31;--ink:#EEF3D8;--ink-2:#B3A7B6;--rule:rgba(238,243,216,.13);
  --accent:#C9E265;--on-accent:#35203A;color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font-body);font-size:clamp(17px,.35vw + 15.5px,19px);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:clip}
img,video{max-width:100%;height:auto}
a{color:var(--link,var(--accent));text-decoration-thickness:.08em;text-underline-offset:.18em}
a:hover{text-decoration-thickness:.14em}
[hidden]{display:none!important}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:8px;z-index:100;background:var(--ink);color:var(--paper);padding:8px 14px;border-radius:8px}
.skip:focus{left:8px}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.wrap{width:100%;max-width:calc(var(--maxw) + 2*var(--gut));margin:0 auto;padding-left:var(--gut);padding-right:max(16px,env(safe-area-inset-right,0px))}

/* ---------- Header ---------- */
.site-head{position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--paper) 86%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.3);backdrop-filter:blur(14px) saturate(1.3);border-bottom:1px solid transparent;transition:border-color .25s}
/* a custom header stays at the top with the controls under it that it does not have of its own */
.custom-head{position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--paper) 86%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.3);backdrop-filter:blur(14px) saturate(1.3)}
.site-head.under-custom{position:static;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}
.site-head.under-custom .head-row{min-height:48px}
.site-head.under-custom .head-tools{margin-left:auto}
.site-head.scrolled{border-bottom-color:var(--rule)}
.head-row{display:flex;align-items:center;gap:16px;min-height:64px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:700;letter-spacing:-.01em;font-size:1.05rem;min-width:0}
.brand-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover}
.brand-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-text{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0;line-height:1.2}
.brand-text .brand-name{max-width:100%}
.brand-tagline{font-weight:400;font-size:.8rem;letter-spacing:0;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.head-nav{display:flex;gap:18px;margin-left:auto;font-size:.92rem;flex-shrink:0}
.head-nav a{color:var(--ink-2);text-decoration:none}
.head-nav a:hover{color:var(--ink)}
.head-nav .main-site{color:var(--accent)}
.head-tools{display:flex;align-items:center;gap:8px;flex:none}
.head-nav + .head-tools{margin-left:4px}
.icon-btn{appearance:none;-webkit-appearance:none;flex:none;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid var(--rule);border-radius:50%;background:transparent;color:var(--ink);cursor:pointer;transition:border-color .2s,background-color .2s;text-decoration:none}
.icon-btn:hover{border-color:var(--ink)}
.theme-btn svg{display:block;width:26px;height:20px;transform:translateX(1px)}
.theme-btn .t-moon,.theme-btn .t-auto{display:none}
.theme-btn[data-eff="dark"] .t-sun{display:none}
.theme-btn[data-eff="dark"] .t-moon{display:inline}
.theme-btn[data-mode="auto"] .t-auto{display:inline}
.theme-btn:not([data-mode="auto"]) svg{transform:translateX(3px)}
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-old(root){z-index:1}
::view-transition-new(root){z-index:2}
.menu-btn{display:none;position:relative}
.menu-btn.has-extras{display:grid} /* a filter or the author's links to show: the button is there at every width */
.menu-btn .bars{display:grid;gap:5px;width:16px}
.menu-btn .bars span{display:block;height:1.8px;background:currentColor;border-radius:2px}
.menu-dot{position:absolute;top:-1px;right:-1px;width:13px;height:13px;border-radius:50%;background:var(--accent);border:2px solid var(--paper)} /* a filter is on */
@media (max-width:760px){
  .head-nav{display:none}
  .menu-btn{display:grid}
  .head-tools,.head-nav + .head-tools{margin-left:auto}
  .brand-tagline{font-size:.78rem;white-space:normal;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
  .brand .brand-logo{height:30px;max-width:30vw}
}

/* ---------- Menu: the navigation (narrow screens), the filter and the author's links ----------
   The theme's script opens it as a modal dialog: a panel from the right, a sheet from the bottom on phones.
   Closed, it is not drawn. Without scripts (or without <dialog>) it stands in the page under the header. */
.site-menu{display:none;position:static;width:auto;max-width:calc(var(--maxw) + 2*var(--gut));height:auto;max-height:none;margin:0 auto;padding:0 max(16px,env(safe-area-inset-right,0px)) 0 var(--gut);border:0;background:transparent;color:var(--ink);overflow:visible}
.site-menu.is-static{display:block}
.site-menu:not([open]) .menu-head{display:none}
.menu-part{padding-top:14px}
.menu-part h3{margin:0 0 8px;font-size:.74rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2)}
.menu-part .post-filter{margin:0}
.menu-nav{display:none} /* wide screens have the navigation in the header */
.site-menu.has-nav .menu-nav{display:grid}
.mnav a{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:10px 0;border-bottom:1px solid var(--rule);color:var(--ink);text-decoration:none;font-size:1.05rem}
.site-menu[open]{display:block;position:fixed;inset:0 0 0 auto;width:min(380px,calc(100vw - 48px));max-width:none;margin:0;padding:0 max(20px,env(safe-area-inset-right,0px)) max(24px,env(safe-area-inset-bottom,0px)) 20px;background:var(--paper);border-left:1.5px solid color-mix(in srgb,var(--ink) 26%,var(--paper));overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;--menu-off:translateX(100%);animation:menu-in .24s var(--ease)}
.site-menu::backdrop{background:rgba(0,0,0,.45);animation:menu-fade .2s ease-out}
.site-menu.is-closing{animation:menu-out .18s ease-in forwards}
.site-menu.is-closing::backdrop{animation:menu-fade-out .18s ease-in forwards}
@keyframes menu-in{from{transform:var(--menu-off)}}
@keyframes menu-out{to{transform:var(--menu-off)}}
@keyframes menu-fade{from{opacity:0}}
@keyframes menu-fade-out{to{opacity:0}}
@media (prefers-reduced-motion:reduce){.site-menu[open],.site-menu::backdrop{animation:none!important}}
.menu-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 2px;padding:max(12px,env(safe-area-inset-top,0px)) 0 10px;background:var(--paper)}
.menu-head h2{margin:0;font-size:1.05rem;letter-spacing:-.01em}
.menu-grip{display:none}
.site-menu[open] .menu-part{padding-top:20px}
.site-menu[open] .post-filter{display:grid;gap:10px}
.site-menu[open] .type-filter{display:grid}
.site-menu[open] .type-filter a{padding:.9em .5em;font-size:.9rem}
.site-menu[open] .menu-filter + .menu-nav{margin-top:12px}
.site-menu[open] .menu-nav:has(a:nth-child(7)){grid-template-columns:1fr 1fr;column-gap:20px} /* a long navigation: two columns */
.site-menu[open] .menu-nav:has(a:nth-child(7)) a{font-size:.98rem;line-height:1.25}
.site-menu[open] .with-filter{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.site-menu[open] .with-filter a{justify-content:center;min-height:44px;font-size:.9rem}
.site-menu[open] .social-icons{display:flex;flex-wrap:wrap;gap:8px;padding:0;overflow:visible;background:none;border:0;border-radius:0;box-shadow:none}
.site-menu[open] .social-icons a{min-width:44px;height:44px;border:1.5px solid var(--rule)}
.site-menu[open] .social-icons.style-icons a{width:44px}
.feed-links{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.feed-links a{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border:1.5px solid var(--rule);border-radius:var(--radius,10px);color:var(--ink);font-size:.92rem;font-weight:600;text-decoration:none}
.feed-links a:hover{border-color:var(--ink)}
@media (max-width:760px){
  .menu-nav{display:grid}
  .site-menu[open]{inset:auto 0 0 0;width:100%;max-height:calc(100% - 56px);padding:0 max(16px,env(safe-area-inset-right,0px)) max(20px,env(safe-area-inset-bottom,0px)) var(--gut);border-left:0;border-top:1.5px solid color-mix(in srgb,var(--ink) 26%,var(--paper));border-radius:var(--radius) var(--radius) 0 0;--menu-off:translateY(100%)}
  .site-menu[open] .menu-head{padding-top:20px}
  .site-menu[open] .menu-grip{display:block;position:absolute;top:8px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:color-mix(in srgb,var(--ink) 30%,var(--paper))}
}
/* A filter is on: the page says which, in a line above the posts (the filter itself is in the menu). */
.filter-note{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:0 0 clamp(14px,2.5vw,22px);font-size:.84rem;line-height:1.3}
.page-title + .filter-note{margin-top:-.6em}
.filter-note b{padding:.32em .7em;border:1.5px solid color-mix(in srgb,var(--ink) 24%,var(--paper));border-radius:8px;font-weight:600}
.filter-note a{padding:.32em .3em;color:var(--ink-2)}

/* ---------- Main ---------- */
.main{padding-top:clamp(20px,4vw,48px);padding-bottom:64px;min-height:60vh}
/* ---------- Footer ---------- */
.site-foot{border-top:1px solid var(--rule);padding:32px 0 calc(48px + env(safe-area-inset-bottom,0px));font-size:.88rem;color:var(--ink-2)}
.foot-row{display:grid;gap:20px}
.author-card{display:flex;gap:14px;align-items:center}
.author-card>div{min-width:0}
.author-card img{width:56px;height:56px;border-radius:50%;object-fit:cover;flex:none}
.author-card .p-name{display:block;font-weight:700;color:var(--ink);text-decoration:none;font-size:1rem;line-height:1.3}
.author-card .p-note p{margin:.2em 0}
.author-card .p-note>:first-child{margin-top:.15em}.author-card .p-note>:last-child{margin-bottom:0}
.rel-me{display:flex;flex-wrap:wrap;gap:4px 12px;margin:.4em 0 0}
.rel-me a{color:var(--ink-2)}
.foot-links a{color:var(--ink-2)}
.foot-links{margin:0}
.foot-custom > :first-child{margin-top:0}
.foot-custom > :last-child{margin-bottom:0}
.foot-custom a{color:var(--ink-2)}
/* ---------- Logo and social icons ---------- */
.brand-logo{height:36px;width:auto;max-width:180px;flex:none;object-fit:contain}
.head-row.is-crowded .head-nav{display:none}
.head-row.is-crowded .menu-btn{display:grid}
.head-row.is-crowded .head-tools{margin-left:auto}
.site-foot .social-footer{justify-content:flex-start}
/* ---------- Back to top (ring fills with scroll progress) ---------- */
.to-top{position:fixed;z-index:25;right:max(20px,calc(env(safe-area-inset-right,0px) + 12px));bottom:max(20px,calc(env(safe-area-inset-bottom,0px) + 14px));width:54px;height:54px;display:grid;place-items:center;border-radius:50%;color:var(--ink);background:color-mix(in srgb,var(--paper) 82%,transparent);-webkit-backdrop-filter:blur(12px) saturate(1.3);backdrop-filter:blur(12px) saturate(1.3);box-shadow:0 12px 28px -16px rgba(0,0,0,.5);text-decoration:none;touch-action:manipulation;opacity:0;visibility:hidden;transform:translateY(14px) scale(.9);transition:opacity .35s var(--ease),transform .45s var(--ease),visibility 0s linear .45s,color .2s}
.to-top.show{opacity:1;visibility:visible;transform:none;transition:opacity .35s var(--ease),transform .45s var(--ease),visibility 0s,color .2s}
.to-top svg{width:54px;height:54px;display:block;overflow:visible}
.tt-track{fill:none;stroke:var(--rule);stroke-width:1.5}
.tt-prog{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:calc(100 - var(--p,0))}
.tt-arrow{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .4s var(--ease)}
@media (hover:hover){.to-top:hover{color:var(--accent)}.to-top:hover .tt-arrow{transform:translateY(-3px)}}
.to-top:active .tt-arrow{transform:translateY(-6px)}
.to-top:focus-visible{outline-offset:4px;border-radius:50%}

/* Snug Den: a ring and a seal on the author's picture */
.plus-ring{position:relative;display:inline-grid;place-items:center;flex:none;padding:3px;border-radius:50%;vertical-align:middle;
  background:conic-gradient(from 200deg,#7C9A1E,#C9E265 18%,#4E6A10 36%,#B5D33F 52%,#5E7A14 70%,#A9C83F 86%,#7C9A1E)}
.plus-ring.sm{padding:2px}
.plus-ring>img{display:block;border-radius:50%;box-shadow:0 0 0 2px var(--paper,#fff)}
.plus-seal{position:absolute;right:-3px;bottom:-3px;width:32%;min-width:18px;max-width:32px;aspect-ratio:1;display:block;line-height:0}
.plus-seal svg{width:100%;height:100%;display:block;overflow:visible;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.25))}
.plus-seal .seal-edge{fill:#C9E265;stroke:#4E6A10;paint-order:stroke}
.plus-seal .seal-check{stroke:#35203A}
/* the ring in dark mode: brighter shades, so it shines on the dark page; in light mode deeper ones, so it shows on the pale page */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .plus-ring{background:conic-gradient(from 200deg,#C9E265,#F4FAD2 18%,#9DBA3C 36%,#E6F3A6 52%,#7E9A2C 70%,#F4FAD2 86%,#C9E265)}:root:not([data-theme="light"]) .plus-seal .seal-edge{stroke:#C9E265}}
:root[data-theme="dark"] .plus-ring{background:conic-gradient(from 200deg,#C9E265,#F4FAD2 18%,#9DBA3C 36%,#E6F3A6 52%,#7E9A2C 70%,#F4FAD2 86%,#C9E265)}:root[data-theme="dark"] .plus-seal .seal-edge{stroke:#C9E265}


/* the footer: everything centred; the default one has the blog's logo, its copyright line and "Powered by Snug" */
.foot-row{justify-items:center;text-align:center}
.site-foot .author-card{justify-content:center;text-align:left}
.site-foot .social-footer{justify-content:center}
.foot-default{display:grid;justify-items:center;gap:10px}
.foot-logo img{display:block;height:40px;width:auto;max-width:60vw}
.foot-copy{margin:0}
.powered-bar{padding:20px 16px 28px;text-align:center}
.powered-bar .powered{margin:0}
.foot-copy a{color:var(--ink-2)}
.foot-license{margin:0;font-size:.85em;color:var(--ink-2)}
.foot-license a{color:var(--ink-2)}
.foot-license .cc-badge-row{display:block;margin:0 0 8px}
.foot-license .cc-badge{display:inline-block;vertical-align:top}
.foot-license .cc-badge img{display:block;height:31px;width:auto;max-width:88px} /* the badge at Creative Commons' own small size */
.powered{margin:0}
.powered a{display:inline-flex;align-items:center;gap:7px;color:var(--ink-2);text-decoration:none;font-weight:600}
.powered a:hover{color:var(--ink)}
.powered svg{flex:none}

/* the footer in two columns when the author card is shown: the author on the left, the site on the right */
.foot-site{display:grid;justify-items:center;gap:14px;text-align:center;min-width:0}
.foot-row.two{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:start;justify-items:stretch;text-align:left;gap:28px 48px}
.foot-author{display:grid;gap:12px;min-width:0;justify-items:start}
.author-card.stacked{display:block}
.author-card.stacked .author-line{display:inline-flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none}
.author-card.stacked .author-line img{width:48px;height:48px}
.author-card.stacked .p-name{display:inline;font-size:1.02rem}
.author-card.stacked .p-note{margin-top:10px;max-width:34em}
.author-card.stacked .p-note>:first-child{margin-top:0}
.site-foot .foot-author .social-footer{justify-content:flex-start}
@media (max-width:640px){.foot-row.two{grid-template-columns:minmax(0,1fr)}.foot-row.two .foot-site{padding-top:20px;border-top:1px solid var(--rule)}}
/* the menu button turns into a cross while the menu is open (tapping it, over the dimmed page, closes the menu) */
.menu-btn .bars span{transition:transform .2s ease}
.menu-btn[aria-expanded="true"] .bars span:first-child{transform:translateY(3.4px) rotate(45deg)}
.menu-btn[aria-expanded="true"] .bars span:last-child{transform:translateY(-3.4px) rotate(-45deg)}
@media (prefers-reduced-motion:reduce){.menu-btn .bars span{transition:none}}

/* the menu's filter: a form; several choices, then "Show posts" */
.filter-form fieldset{border:0;margin:0;padding:0;min-width:0}
.filter-form .with-pick legend{float:left;width:100%;margin:6px 0 8px;font-size:.74rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2)}
.type-pick::before{display:none}
.type-pick label,.with-pick label{position:relative;display:block;min-width:0}
.type-pick input,.with-pick input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.type-pick span{display:block;padding:.75em .5em;border-radius:999px;color:var(--ink-2);font-size:.9rem;font-weight:600;text-align:center;white-space:nowrap}
.type-pick input:checked+span{background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--rule)}
.with-pick span{display:flex;align-items:center;justify-content:center;gap:.42em;min-height:44px;padding:0 .8em;border-radius:999px;background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink-2);font-size:.9rem;font-weight:600}
.with-pick input:checked+span{background:var(--ink);color:var(--paper)}
.type-pick input:focus-visible+span,.with-pick input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.filter-actions{display:flex;align-items:center;gap:16px;margin-top:4px}
.filter-actions .btn{flex:1;justify-content:center;min-height:44px}
.filter-clear{color:var(--ink-2);font-size:.9rem}
.site-menu[open] .with-pick{display:grid;grid-template-columns:1fr 1fr;gap:8px}

/* links the owner put in the menu only: on wide screens the menu lists them (the top bar has the rest) */
.menu-nav.has-menu-only{display:grid}
@media (min-width:761px){.site-menu:not(.has-nav) .menu-nav a.in-top{display:none}}
.menu-admin{margin:22px 0 0;padding-top:14px;border-top:1px solid var(--rule)}
.menu-admin a{display:inline-flex;align-items:center;gap:8px;min-height:40px;color:var(--ink-2);font-size:.9rem;font-weight:600;text-decoration:none}
.menu-admin a:hover{color:var(--ink)}
.site-menu[open] .with-pick legend,.with-pick legend{grid-column:1/-1;float:none;padding:0}
