/* The slopped.site header and its drawer (world/header.mjs makes the markup; slopped-brand, "Page pattern").
   Copied to every site by `npm run sync:brand`; never edit the copies. Uses the page's brand tokens when defined. */

/* the drawer's title is Archivo Black (self-hosted, copied by sync:brand); declared here too so every page has it */
@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; }
@font-face { font-family: "Archivo Black Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Noto Sans Bold"), local("NotoSans-Bold"); size-adjust: 112%; }

/* ------------------------------------------------------------ the bar: masthead left, links + one icon right */
.sh-wrap { box-sizing: border-box; max-width: var(--sh-max, 1440px); margin: 0 auto; padding: 0 var(--sh-pad, 5%); }
.sh-wrap *, .sh-drawer, .sh-drawer * { box-sizing: border-box; }
header.sh {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 100px; margin: 0; padding: 0; border-bottom: 1px solid var(--line, #d4d2c9);
  background: none; color: var(--ink, #171815); font-family: Arial, Helvetica, sans-serif;
}
header.sh .masthead { display: flex; align-items: center; flex: none; min-width: 0; }
header.sh .brand { display: flex; align-items: center; flex: none; min-height: 42px; line-height: 0; }
header.sh .brand img { display: block; width: auto; height: 30px; }
header.sh .site-name {
  display: inline-flex; align-items: center; min-height: 42px; margin-left: 16px; padding-left: 17px;
  background: linear-gradient(var(--line, #d4d2c9), var(--line, #d4d2c9)) left center / 1px 22px no-repeat;
  color: var(--ink, #171815); font: 700 16px/1.2 Arial, Helvetica, sans-serif; letter-spacing: -.3px; text-decoration: none; white-space: nowrap;
}
header.sh .site-name:hover { text-decoration: underline; text-underline-offset: 4px; }
header.sh .sh-nav {
  display: flex; align-items: center; justify-content: flex-end; gap: 30px; flex: 1 1 auto; min-width: 0;
  margin: 0 0 0 auto; padding: 0; overflow: hidden; white-space: nowrap; font: 400 14px/1.2 Arial, Helvetica, sans-serif;
}
header.sh .sh-nav a { display: inline-flex; align-items: center; min-height: 42px; padding: 0; color: var(--ink, #171815); text-decoration: none; }
header.sh .sh-nav a:hover, header.sh .sh-nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
header.sh.sh-fold .sh-nav { visibility: hidden; }

/* the one icon: a 42 px outlined circle with two lines (the brand's header buttons) */
.sh-menu {
  position: relative; display: block; flex: none; width: 42px; height: 42px; margin: 0; padding: 0;
  border: 1px solid var(--ink, #171815); border-radius: 50%; background: transparent; color: var(--ink, #171815);
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.sh-menu::before, .sh-menu::after { content: ""; position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 1px; background: currentColor; }
.sh-menu::before { top: 16px; }
.sh-menu::after { top: 22px; }
.sh-menu:focus-visible, .sh-drawer a:focus-visible, .sh-drawer button:focus-visible { outline: 3px solid #728600; outline-offset: 3px; }
.sh-menu:focus-visible { outline-offset: 5px; }

@media (max-width: 760px) {
  header.sh { height: 80px; gap: 12px; }
  header.sh .brand img { height: 24px; }
  header.sh .site-name { margin-left: 11px; padding-left: 12px; font-size: 15px; background-size: 1px 18px; }
  header.sh .sh-nav { display: none; }
}

/* ------------------------------------------------------------ the drawer */
dialog.sh-drawer {
  position: fixed; inset: 0; z-index: 1000; display: none; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: transparent; color: var(--ink, #171815);
  font: 400 15px/1.4 Arial, Helvetica, sans-serif; text-align: left;
}
dialog.sh-drawer[open], dialog.sh-drawer:target { display: block; }
dialog.sh-drawer::backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
html.sh-open, html.sh-open body { overflow: hidden; }
.sh-scrim { position: absolute; inset: 0; display: block; background: rgba(23, 24, 21, .42); cursor: default; }
.sh-panel {
  position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
  width: min(380px, calc(100% - 44px)); overflow-y: auto; overscroll-behavior: contain;
  padding: 0 max(24px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) 24px;
  border-left: 1px solid var(--ink, #171815); background: var(--paper, #f4f1e8);
}
.sh-drawer a { color: var(--ink, #171815); text-decoration: none; }
.sh-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: none;
  min-height: 100px; padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--ink, #171815);
}
.sh-title {
  min-width: 0; font-family: "Archivo Black", "Arial Black", "Archivo Black Fallback", Arial, sans-serif; font-size: 26px; font-weight: 1000;
  font-synthesis: none; letter-spacing: -1px; line-height: 1.05; overflow-wrap: anywhere;
}
.sh-close { position: relative; display: block; flex: none; width: 42px; height: 42px; border: 1px solid var(--ink, #171815); border-radius: 50%; }
.sh-close::before, .sh-close::after { content: ""; position: absolute; top: 19px; left: 11px; width: 18px; height: 2px; border-radius: 1px; background: var(--ink, #171815); transform: rotate(45deg); }
.sh-close::after { transform: rotate(-45deg); }
/* hover fills only where there is a pointer that hovers (a tap would leave them stuck black on phones) */
@media (hover: hover) {
  .sh-menu:hover { background: var(--ink, #171815); color: var(--paper, #f4f1e8); }
  .sh-close:hover { background: var(--ink, #171815); }
  .sh-close:hover::before, .sh-close:hover::after { background: var(--paper, #f4f1e8); }
}

/* this site's own links */
.sh-own { display: block; margin: 0; padding: 6px 0 0; }
.sh-own a { display: flex; align-items: center; min-height: 50px; border-bottom: 1px solid var(--line, #d4d2c9); font-size: 19px; font-weight: 700; letter-spacing: -.4px; }
.sh-own a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sh-own a[aria-current]::after { content: ""; width: 10px; height: 10px; margin-left: 10px; border: 1px solid var(--ink, #171815); border-radius: 50%; background: var(--acid, #e3ff59); }

/* actions that used to be header buttons: Install, Saved ♡ … (an empty row takes no room) */
.sh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.sh-actions > * { margin-top: 20px; }
html:not(.can-install) .sh-drawer [data-install] { display: none !important; }
.sh-actions > button, .sh-actions > a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid var(--ink, #171815); border-radius: 30px;
  background: transparent; color: var(--ink, #171815); font: 400 14px/1 Arial, Helvetica, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.sh-actions > [aria-pressed="true"] { background: var(--acid, #e3ff59); }
.sh-actions > button:hover, .sh-actions > a:hover { background: var(--ink, #171815); color: var(--paper, #f4f1e8); }
.sh-actions svg { display: block; flex: none; }

/* Elsewhere: every live site */
.sh-else { display: block; margin: 34px 0 0; padding: 0; }
.sh-else h2 {
  margin: 0 0 6px; padding: 0; color: var(--muted, #6b6b62); font: 700 11px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 2px; text-transform: uppercase; text-wrap: initial;
}
.sh-else ul { margin: 0; padding: 0; list-style: none; }
.sh-else li { margin: 0; padding: 0; border-bottom: 1px solid var(--line, #d4d2c9); }
.sh-else li:nth-child(2) { border-bottom-color: var(--ink, #171815); } /* the two gateways, then the sites */
.sh-else a { display: block; padding: 10px 0 11px; }
.sh-else b { display: inline; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.sh-else span { display: block; margin-top: 2px; color: var(--muted, #6b6b62); font-size: 13px; line-height: 1.35; }
.sh-else a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.sh-else a[aria-current] b { padding: 0 5px; margin-left: -5px; background: var(--acid, #e3ff59); box-decoration-break: clone; -webkit-box-decoration-break: clone; }

@media (max-width: 760px) {
  .sh-top { min-height: 80px; }
  .sh-title { font-size: 22px; }
  .sh-panel { padding-left: 20px; padding-right: max(20px, env(safe-area-inset-right)); }
}

/* the slide: from the right, the scrim fades (none with reduced motion). :target is the no-JavaScript drawer. */
@media (prefers-reduced-motion: no-preference) {
  .sh-drawer .sh-panel { transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
  .sh-drawer .sh-scrim { transition: opacity .26s; }
  .sh-drawer.sh-anim:not(.sh-in) .sh-panel { transform: translateX(100%); }
  .sh-drawer.sh-anim:not(.sh-in) .sh-scrim { opacity: 0; }
  dialog.sh-drawer:target:not([open]) .sh-panel { animation: sh-slide .26s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes sh-slide { from { transform: translateX(100%); } }
