/* ============================================================
   ramani - a map of the good, unsloppy, tasteful web
   UI modelled on opencode.ai: fixed numbered sidebar, mono
   display type over Inter body copy, hairline rules, dither
   texture, one blue accent, square black buttons.
   ============================================================ */

:root{
  /* light fallbacks first, then the light-dark() pair */
  --grey-1:#fbfbfb;  --grey-2:#fff;     --grey-3:#f5f5f5;  --grey-4:#eee;
  --grey-5:#e0e0e0;  --grey-6:#d2d2d2;  --grey-7:#888;     --grey-8:#6b6b6b;
  --grey-9:#5c5c5c;  --grey-10:#3a3a3a; --grey-11:#161616;

  --grey-1:light-dark(#fbfbfb,#0c0c0c);
  --grey-2:light-dark(#fff,#161616);
  --grey-3:light-dark(#f5f5f5,#1a1a1a);
  --grey-4:light-dark(#eee,#242424);
  --grey-5:light-dark(#e0e0e0,#2e2e2e);
  --grey-6:light-dark(#d2d2d2,#4b4b4b);
  --grey-7:light-dark(#888,#6a6a6a);
  --grey-8:light-dark(#6b6b6b,#8f8f8f);
  --grey-9:light-dark(#5c5c5c,#aeaeae);
  --grey-10:light-dark(#3a3a3a,#dbdbdb);
  --grey-11:light-dark(#161616,#fafafa);

  --bg:var(--grey-1);
  --bg-weak:var(--grey-3);
  --bg-weaker:var(--grey-4);
  --bg-strong:var(--grey-11);
  --bg-strong-hover:var(--grey-10);

  --text-strong:var(--grey-11);
  --text:var(--grey-9);
  --text-weak:var(--grey-8);
  --text-muted:var(--grey-8);
  --text-faint:var(--grey-7);
  --text-inverted:light-dark(#fff,#0c0c0c);

  --border:var(--grey-5);
  --border-strong:var(--grey-6);
  --link:light-dark(#3b5cf6,#6b8fff);

  /* card media stays dark in both themes, like opencode's product tiles */
  --media:light-dark(#161616,#1a1a1a);
  --media-ink:light-dark(#fafafa,#fafafa);

  --font-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --font-sans:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;

  --fs-micro:11px;
  --fs-meta:12px;
  --fs-small:14px;
  --fs-ui:15px;
  --fs-read:16px;
  --fs-title:17px;
  --fs-large:18px;

  --sidebar:clamp(224px,20vw,360px);
  --topbar-height:3.5rem;
  --edge:1.5rem;
  --rule:1px solid var(--border);
  --ease-out:cubic-bezier(.23,1,.32,1);
}

*{box-sizing:border-box}

html{
  color-scheme:light dark;
  background:var(--bg);
  -webkit-text-size-adjust:100%;
  scroll-padding-top:4.5rem;
}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:400 var(--fs-ui)/1.6 var(--font-sans);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

a{color:inherit}
::selection{background:var(--link);color:#fff}
:focus-visible{outline:2px solid var(--link);outline-offset:2px}

.hidden{display:none !important}

/* skip link: hidden until focused */
.skip-link{
  position:fixed;top:.5rem;left:.5rem;z-index:100;
  transform:translateY(-200%);
  padding:.5rem .75rem;
  background:var(--bg-strong);
  color:var(--text-inverted);
  font-family:var(--font-mono);
  font-size:var(--fs-small);
  text-decoration:none;
  transition:transform .15s var(--ease-out);
}
.skip-link:focus-visible{transform:translateY(0)}

/* micro caps label - reserved for metadata rows */
.micro{
  margin:0;
  font-family:var(--font-mono);
  font-size:var(--fs-micro);
  letter-spacing:.01em;
  color:var(--text-faint);
}

/* dithered band - opencode's texture flourish, done with dots */
.dither{
  height:3.5rem;
  color:var(--text-strong);
  background-image:radial-gradient(currentColor 1px,transparent 1px);
  background-size:4px 4px;
  opacity:.14;
  pointer-events:none;
  margin-top:2rem;
  -webkit-mask-image:linear-gradient(to bottom,#000,transparent 85%);
  mask-image:linear-gradient(to bottom,#000,transparent 85%);
}

/* ---------------- sidebar / topbar ---------------- */
.sidebar{
  position:fixed;
  inset:0 auto 0 0;
  z-index:60;
  display:flex;
  flex-direction:column;
  width:var(--sidebar);
  padding:1.55rem 1rem 0 1.35rem;
  background:var(--bg);
}

.brand{
  display:inline-flex;align-items:center;gap:.625rem;
  width:max-content;
  text-decoration:none;
  font-family:var(--font-mono);
  font-size:var(--fs-ui);
  font-weight:500;
  letter-spacing:-.02em;
  color:var(--text-strong);
}
.brand-mark{
  display:block;flex-shrink:0;
  width:30px;height:30px;
  background-color:currentColor;
  -webkit-mask:url('../nav-logo.png') center/contain no-repeat;
  mask:url('../nav-logo.png') center/contain no-repeat;
  transition:background-color .15s ease;
}
.brand:hover .brand-mark{background-color:var(--link)}
.brand-word{display:none}

.sidenav{margin-top:2.4rem}
.sidenav ul{list-style:none;margin:0;padding:0}
.sidenav li{display:block}
.sidenav a{
  display:flex;align-items:center;gap:.625rem;
  padding:.65rem 0;
  font-family:var(--font-mono);
  font-size:var(--fs-ui);
  line-height:1.4;
  color:var(--text-weak);
  text-decoration:none;
  transition:color .15s ease;
}
.sidenav a:hover,
.sidenav a:active{color:var(--text-strong)}
.sidenav a[aria-current="page"]{color:var(--text-strong)}
.sidenav .nav-index{
  color:var(--text-faint);
  font-variant-numeric:tabular-nums;
}
.sidenav .nav-label{white-space:nowrap}

/* leading line icons for each nav item */
.nav-icon{
  display:block;flex-shrink:0;
  width:18px;height:18px;
  background-color:currentColor;
  opacity:.9;
}
.nav-icon-index{
  -webkit-mask:url('../icons/nav-index.png') center/contain no-repeat;
  mask:url('../icons/nav-index.png') center/contain no-repeat;
}
.nav-icon-tags{
  -webkit-mask:url('../icons/nav-tags.png') center/contain no-repeat;
  mask:url('../icons/nav-tags.png') center/contain no-repeat;
}
.nav-icon-search{
  -webkit-mask:url('../icons/nav-search.png') center/contain no-repeat;
  mask:url('../icons/nav-search.png') center/contain no-repeat;
}
.nav-icon-readme{
  -webkit-mask:url('../icons/nav-readme.png') center/contain no-repeat;
  mask:url('../icons/nav-readme.png') center/contain no-repeat;
}
.nav-icon-github{
  -webkit-mask:url('../icons/nav-github.png') center/contain no-repeat;
  mask:url('../icons/nav-github.png') center/contain no-repeat;
}
.nav-external{
  flex-shrink:0;
  margin-inline-start:.15rem;
  opacity:.75;
}

.sidebar-actions{
  position:fixed;
  top:1.35rem;
  right:1.5rem;
  display:flex;align-items:center;gap:.35rem;
}
.icon-btn{
  display:inline-grid;place-items:center;
  width:2.25rem;height:2.25rem;
  padding:0;
  background:none;border:0;border-radius:0;
  color:var(--text-weak);
  text-decoration:none;
  cursor:pointer;
  transition:color .15s ease;
}
.icon-btn:hover{color:var(--text-strong)}
.icon-btn svg{display:block}
.theme-toggle .theme-icon{display:none;grid-area:1/1}
html[data-theme="system"] .theme-toggle .theme-icon[data-when="system"],
html[data-theme="light"] .theme-toggle .theme-icon[data-when="light"],
html[data-theme="dark"] .theme-toggle .theme-icon[data-when="dark"]{display:block}

/* mobile menu toggle: two hairlines, no icon files */
.menu-toggle{
  display:none;position:relative;
  width:2.25rem;height:2.25rem;padding:0;
  align-items:center;justify-content:center;
  background:none;border:0;cursor:pointer;
  color:var(--text-strong);
}
.menu-toggle span{
  position:absolute;left:.55rem;right:.55rem;top:calc(50% - .75px);
  height:1.5px;background:currentColor;
  transition:transform .2s var(--ease-out);
}
.menu-toggle span:first-child{transform:translateY(-3.5px)}
.menu-toggle span:last-child{transform:translateY(3.5px)}
.menu-toggle[aria-expanded="true"] span:first-child{transform:rotate(45deg)}
.menu-toggle[aria-expanded="true"] span:last-child{transform:rotate(-45deg)}

/* slide-down sheet with numbered rows */
.sheet{
  position:fixed;inset:var(--topbar-height) 0 0;
  z-index:55;
  display:none;
  background:var(--bg);
}
.sheet[data-open="true"]{display:block}
.sheet .sheet-inner{
  padding:.5rem var(--edge) 2rem;
  max-height:100%;
  overflow-y:auto;
}
.sheet ul{list-style:none;margin:0;padding:0}
.sheet a{
  display:flex;align-items:center;gap:.625rem;
  min-height:3.5rem;
  font-family:var(--font-mono);
  font-size:var(--fs-large);
  color:var(--text);
  text-decoration:none;
}
.sheet a:hover,
.sheet a:active{color:var(--text-strong)}
.sheet .nav-index{color:var(--text-faint)}

/* ---------------- page frame ---------------- */
.site-frame{
  margin-inline-start:var(--sidebar);
  min-height:100vh;
}

.wrap{
  max-width:1600px;
  padding:5.125rem 1.5rem 0 1rem;
}

/* ---------------- hero ---------------- */
.hero{
  display:flex;flex-direction:column;gap:1.5rem;
}
.hero h1,
.hero-title{
  margin:0;
  max-width:56rem;
  font-family:var(--font-mono);
  font-size:clamp(2.4rem,4.45vw,3.75rem);
  font-weight:400;
  line-height:1.04;
  letter-spacing:-.03em;
  color:var(--text-strong);
  text-wrap:balance;
}
.hero-tagline{
  margin:0;
  max-width:46rem;
  font-size:var(--fs-large);
  line-height:1.4;
  color:var(--text-weak);
  text-wrap:pretty;
}
.hero-stats{
  display:flex;flex-wrap:wrap;gap:.25rem .75rem;
  margin:.25rem 0 0;
  font-family:var(--font-mono);
  font-size:var(--fs-meta);
  color:var(--text-faint);
}
.hero-stats b{font-weight:400;color:var(--text)}
.hero-stats .sep{color:var(--border-strong)}

/* ---------------- toolbar: search + filters ---------------- */
.toolbar{
  position:static;
  margin-top:3rem;
  padding-block:.75rem;
  border-top:var(--rule);
  border-bottom:var(--rule);
  background:var(--bg);
}
.toolbar-row{
  display:flex;align-items:center;gap:.75rem;
  flex-wrap:wrap;
}
.search-field{
  display:flex;align-items:center;gap:.5rem;
  flex:1 1 18rem;
  min-width:0;
  height:2.5rem;
  padding:0 .75rem;
  border:var(--rule);
  background:var(--bg);
  transition:border-color .15s ease;
}
.search-field:focus-within{border-color:var(--text-strong)}
.search-field svg{flex-shrink:0;color:var(--text-faint)}
.search-field input{
  flex:1;min-width:0;
  border:0;background:none;
  font:400 var(--fs-small)/1.4 var(--font-mono);
  color:var(--text-strong);
  padding:0;
}
.search-field input::placeholder{color:var(--text-faint)}
.search-field input:focus{outline:none}
.search-field kbd{
  font-family:var(--font-mono);font-size:var(--fs-micro);
  color:var(--text-faint);
  border:var(--rule);
  padding:0 .25rem;
  line-height:1.5;
}
.shown-label{
  margin:0;
  font-family:var(--font-mono);
  font-size:var(--fs-meta);
  color:var(--text-faint);
  white-space:nowrap;
}
.shown-label b{font-weight:400;color:var(--text-strong)}

#tags{
  display:flex;flex-wrap:wrap;align-items:center;
  gap:.75rem;
  margin-top:1rem;
}

/* filter buttons: high-contrast flat squares, light primary / dark active */
.chip{
  appearance:none;
  display:inline-flex;align-items:center;justify-content:center;
  height:2.5rem;
  padding:0 1.1rem;
  font-family:var(--font-sans);
  font-size:14px;
  font-weight:500;
  line-height:1;
  color:#000;
  background:#fff;
  border:1px solid #e0e0e0;
  border-radius:0;
  cursor:pointer;
  transition:color .15s ease,background-color .15s ease,border-color .15s ease;
}
.chip::before{content:none}
.chip:hover{
  color:#000;
  background:#f2f2f2;
  border-color:#d2d2d2;
}
.chip.filter.active{
  background:#333;
  border-color:#333;
  color:#fff;
}
.chip.filter.active:hover{
  background:#444;
  border-color:#444;
}
.chip[data-tag="__clear"]{
  background:#333;
  border-color:#333;
  color:#fff;
}
.chip[data-tag="__clear"]:hover{
  background:#444;
  border-color:#444;
  color:#fff;
}

/* ---------------- section head ---------------- */
.section-head{
  display:flex;align-items:baseline;justify-content:space-between;
  gap:1rem;
  margin-top:2.5rem;
  padding-bottom:.75rem;
  border-bottom:var(--rule);
}
.section-head h2{
  margin:0;
  font-family:var(--font-mono);
  font-size:var(--fs-title);
  font-weight:400;
  letter-spacing:-.01em;
  color:var(--text-strong);
}
.section-count{
  font-family:var(--font-mono);
  font-size:var(--fs-micro);
  color:var(--text-faint);
}
.section-count b{font-weight:400;color:var(--text)}

/* ---------------- link grid: hairline table ---------------- */
/* gap:1px over a border-coloured track paints every internal rule,
   and the outer border closes the table on ragged final rows. */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(258px,1fr));
  gap:0;
  margin-top:1.5rem;
  border:var(--rule);
  border-width:1px 0 0 1px;
}
.card{
  position:relative;
  display:flex;flex-direction:column;
  min-height:16rem;
  border:var(--rule);
  border-width:0 1px 1px 0;
  background:var(--bg);
  text-decoration:none;
  color:inherit;
  overflow:hidden;
  content-visibility:auto;
  contain-intrinsic-size:17rem;
  transition:background-color .15s ease;
  animation:card-in .22s var(--ease-out) both;
  animation-delay:calc(min(var(--i,0),12) * 18ms);
}
@keyframes card-in{from{opacity:0;transform:translateY(-.25rem)}}
.card:hover{background:var(--bg-weak)}
.card:hover .card-bg{opacity:.96}

/* the mascot returns as a full-card background, visible on the right */
.card-bg{
  position:absolute;inset:0;z-index:0;
  background:url('../for-card.png') no-repeat right bottom / auto 100%;
  -webkit-mask-image:linear-gradient(to right,transparent 30%,#000 70%);
  mask-image:linear-gradient(to right,transparent 30%,#000 70%);
  pointer-events:none;
  opacity:.92;
  transition:opacity .2s ease;
}

/* keep the left side solid so the copy stays readable over the image */
.card::before{
  content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(to right,var(--bg) 0%,var(--bg) 54%,transparent 82%);
  pointer-events:none;
}

/* dark media strip - the opencode product-tile cue */
.card-media{
  position:relative;z-index:2;
  display:flex;align-items:flex-start;justify-content:flex-start;
  gap:.5rem;
  padding:.85rem .9rem 0;
  overflow:hidden;
  color:var(--text-faint);
}

.card-index,
.card-cat,
.card-pin{position:relative;z-index:1}
.card-index{
  font-family:var(--font-mono);
  font-size:var(--fs-micro);
  font-variant-numeric:tabular-nums;
  color:var(--text-faint);
}
.card-cat{
  margin-inline-start:.55rem;
  font-family:var(--font-mono);
  font-size:var(--fs-micro);
  color:var(--text-faint);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.card-pin{
  display:inline-flex;
  margin-inline-start:auto;
  color:var(--link);
}

.card-body{
  position:relative;z-index:2;
  display:flex;flex-direction:column;gap:.4rem;
  flex:1;
  max-width:56%;
  padding:.4rem .9rem 1rem;
}
.card-title{
  display:flex;align-items:baseline;gap:.375rem;
  margin:0;
  font-family:var(--font-mono);
  font-size:16px;
  font-weight:400;
  line-height:1.25;
  letter-spacing:-.01em;
  color:var(--text-strong);
}
.card-arrow{
  display:block;
  width:14px;height:14px;
  flex-shrink:0;
  margin-inline-start:auto;
  align-self:center;
  background-color:var(--text-faint);
  -webkit-mask:url('../icons/arrow-right.png') center/contain no-repeat;
  mask:url('../icons/arrow-right.png') center/contain no-repeat;
  transition:transform .2s var(--ease-out),background-color .15s ease;
}
.card:hover .card-arrow{transform:translateX(3px);background-color:var(--link)}

.card-subtitle{
  margin:0;
  font-family:var(--font-sans);
  font-size:var(--fs-small);
  line-height:1.45;
  color:var(--text-weak);
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.card-meta{
  display:flex;flex-wrap:wrap;align-items:center;
  gap:.25rem;
  margin-top:auto;
  padding-top:.55rem;
  font-family:var(--font-mono);
  font-size:var(--fs-micro);
  color:var(--text-faint);
}
.card-meta .meta-item{
  white-space:normal;
  line-height:1.5;
}

/* empty state */
.empty{
  grid-column:1/-1;
  margin:0;
  padding:4rem 1rem;
  text-align:center;
  background:var(--bg);
  color:var(--text-faint);
  font-family:var(--font-mono);
  font-size:var(--fs-small);
}

/* ---------------- footer ---------------- */
.site-footer{
  margin-top:5rem;
  padding-inline:1rem 1.5rem;
  border-top:var(--rule);
}
.footer-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:2rem;
  padding:2.5rem 0 3rem;
}
.footer-nav ul{
  list-style:none;margin:0;padding:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 2rem;
  max-width:34rem;
}
.footer-nav a{
  display:flex;align-items:center;
  padding:.45rem 0;
  font-family:var(--font-mono);
  font-size:var(--fs-ui);
  line-height:1.2;
  color:var(--text-weak);
  text-decoration:none;
  transition:color .15s ease;
}
.footer-nav a:hover,
.footer-nav a:active{color:var(--text-strong)}
.footer-nav .nav-external{margin-inline-start:.3rem}
.footer-box{
  color:var(--text-faint);
  margin-inline-end:.75rem;
}
.footer-stats{text-align:right}
.footer-stats p{
  margin:0;
  padding:.45rem 0;
  font-family:var(--font-mono);
  font-size:var(--fs-ui);
  line-height:1.2;
  color:var(--text-weak);
}
.footer-stats .footer-box{margin-inline-end:.5rem}

.footer-bar{
  display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.5rem;
  padding-block:1rem;
  border-top:var(--rule);
  font-family:var(--font-mono);
  font-size:14px;
  line-height:1.5;
  color:var(--text-faint);
}
.footer-bar a{color:var(--text-weak);text-decoration:none}
.footer-bar a:hover{color:var(--text-strong)}
.footer-bar .footer-bar-end{margin-inline-start:auto}

.footer-wordmark{
  display:block;
  margin:0;
  padding:1.5rem 0 .25rem;
  font-family:var(--font-mono);
  font-size:clamp(4rem,15.5vw,15rem);
  line-height:.8;
  letter-spacing:-.06em;
  font-weight:400;
  color:var(--text-strong);
  overflow:hidden;
  user-select:none;
}

/* ---------------- prose (tags page) ---------------- */
.prose{padding-top:5.125rem}
.prose h1{
  margin:0 0 1.25rem;
  font-family:var(--font-mono);
  font-size:clamp(2.4rem,4.45vw,3.75rem);
  font-weight:400;
  line-height:1.04;
  letter-spacing:-.03em;
  color:var(--text-strong);
}
.prose h3{
  margin:2.75rem 0 1rem;
  font-family:var(--font-mono);
  font-size:var(--fs-micro);
  font-weight:400;
  color:var(--text-faint);
  letter-spacing:.06em;
}
.prose h3::before{content:"[ "}
.prose h3::after{content:" ]"}
.prose p,
.prose li{
  max-width:40rem;
  font-family:var(--font-sans);
  font-size:var(--fs-read);
  line-height:1.55;
  color:var(--text-weak);
}
.prose a{
  color:var(--text-strong);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:.15em;
}
.prose a:hover{color:var(--link)}

/* tag wall: high-contrast light buttons with muted counts */
.taglist{
  display:flex;flex-wrap:wrap;
  gap:.75rem;
  margin:0;padding:0;
  list-style:none;
}
.taglist li{max-width:none}
.taglist a{
  display:inline-flex;align-items:center;gap:.5rem;
  height:2.5rem;
  padding:0 1.1rem;
  border:1px solid #e0e0e0;
  border-radius:0;
  background:#fff;
  font-family:var(--font-sans);
  font-size:14px;
  font-weight:500;
  line-height:1;
  color:#000;
  text-decoration:none;
  transition:color .15s ease,border-color .15s ease,background-color .15s ease;
}
.taglist a:hover,
.taglist a:focus-visible{
  color:#000;
  border-color:#d2d2d2;
  background:#f2f2f2;
}
.taglist b{
  font-weight:500;
  font-variant-numeric:tabular-nums;
  color:#6b6b6b;
}
/* declared in the vocabulary but not yet used by any link */
.taglist a.is-empty{color:#8a8a8a;border-style:dashed}
.taglist a.is-empty:hover{color:#5c5c5c;border-color:#d2d2d2;background:#f2f2f2}

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex;align-items:center;gap:.5rem;
  height:2.5rem;
  padding:0 1.1rem;
  background:#333;
  color:#fff;
  font-family:var(--font-sans);
  font-size:14px;
  font-weight:500;
  text-decoration:none;
  border:1px solid #333;
  border-radius:0;
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease;
}
.btn:hover{background:#444;border-color:#444}
.btn .btn-arrow{
  display:block;
  width:14px;height:14px;
  flex-shrink:0;
  background-color:currentColor;
  -webkit-mask:url('../icons/arrow-right.png') center/contain no-repeat;
  mask:url('../icons/arrow-right.png') center/contain no-repeat;
  transition:transform .2s var(--ease-out);
}
.btn:hover .btn-arrow{transform:translateX(3px)}

/* 404 */
.nf{display:flex;flex-direction:column;gap:1.5rem}
.nf .hero-title{font-size:clamp(2.2rem,4.5vw,3.5rem)}

@media (min-width:64.01rem){
  /* keep the sticky toolbar clear of the fixed corner actions */
  .toolbar-row{padding-right:4.75rem}
}

/* ---------------- responsive: collapse sidebar to topbar ---------------- */
@media (max-width:64rem){
  .sidebar{
    position:sticky;
    inset:auto;
    top:0;
    width:100%;
    height:var(--topbar-height);
    flex-direction:row;
    align-items:center;
    gap:.5rem;
    padding:0 var(--edge);
    border-bottom:var(--rule);
    background:color-mix(in srgb,var(--bg) 88%,transparent);
    backdrop-filter:blur(10px) saturate(140%);
    -webkit-backdrop-filter:blur(10px) saturate(140%);
  }
  @supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
    .sidebar{background:var(--bg)}
  }
  .brand-word{display:inline}
  .sidenav{display:none}
  .sidebar-actions{
    position:static;
    margin-inline-start:auto;
    gap:0;
  }
  .menu-toggle{display:inline-flex}
  .site-frame{margin-inline-start:0}
  .wrap{padding:2.5rem var(--edge) 0}
  .site-footer{padding-inline:var(--edge)}
  .prose{padding-top:2.5rem}
  .toolbar{position:static;top:auto;margin-top:2.5rem}
  .hero h1,.hero-title{font-size:clamp(2.2rem,7vw,3.25rem)}
  .footer-top{grid-template-columns:minmax(0,1fr)}
  .footer-stats{text-align:left;display:flex;flex-wrap:wrap;gap:0 1.5rem}
  .footer-stats p{padding:.25rem 0}
}

@media (max-width:40rem){
  :root{--edge:1rem}
  .hero{gap:1.25rem}
  .hero h1,.hero-title{font-size:min(2.2rem,8.6vw)}
  .hero-tagline{font-size:var(--fs-ui)}
  .dither{height:2.5rem;margin-top:1.5rem}
  .search-field{flex-basis:100%}
  .grid{grid-template-columns:minmax(0,1fr)}
  .footer-nav ul{grid-template-columns:minmax(0,1fr)}
  .footer-bar .footer-bar-end{margin-inline-start:0}
}

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