/* ══════════════════════════════════════════════════════════
   THE DOCK — the one rounded, translucent thing on a site that is
   otherwise hard-edged ink and paper. That contrast is the point.

   Phones:  bottom centre, in the thumb zone.  Menu · count · ask
   Desktop: top right, beside the wordmark.   links · count · ask
   It reads what's behind it and turns to smoked glass over ink.
   ══════════════════════════════════════════════════════════ */

.has-dock #topbar nav{display:none}          /* the dock carries the nav */

#dock{
  --glass:rgba(255,255,255,.60);
  --glass-edge:rgba(255,255,255,.78);
  --glass-hi:rgba(255,255,255,.92);
  --glass-fg:#0C0C0D;
  --glass-fg-2:rgba(12,12,13,.64);
  --glass-rule:rgba(12,12,13,.10);

  position:fixed;z-index:70;
  left:50%;bottom:calc(14px + env(safe-area-inset-bottom,0px));
  translate:-50% 0;
  width:max-content;max-width:calc(100vw - 20px);
  display:flex;flex-direction:column;
  color:var(--glass-fg);
  background:var(--glass);
  -webkit-backdrop-filter:blur(22px) saturate(185%);
  backdrop-filter:blur(22px) saturate(185%);
  border:1px solid var(--glass-edge);
  border-radius:30px;
  box-shadow:
    0 14px 34px -10px rgba(12,12,13,.34),
    0 2px 6px rgba(12,12,13,.08),
    inset 0 1px 0 var(--glass-hi),
    inset 0 -1px 1px rgba(12,12,13,.05);
  transition:background .45s ease,border-color .45s ease,color .45s ease,box-shadow .45s ease,
             opacity .35s ease,translate .5s cubic-bezier(.16,1,.3,1);
  font-family:"Fragment Mono",ui-monospace,Menlo,monospace;
}
/* smoked glass over ink */
#dock.over-ink{
  --glass:rgba(34,34,37,.56);
  --glass-edge:rgba(255,255,255,.16);
  --glass-hi:rgba(255,255,255,.20);
  --glass-fg:#fff;
  --glass-fg-2:rgba(255,255,255,.72);
  --glass-rule:rgba(255,255,255,.14);
  box-shadow:0 14px 34px -10px rgba(0,0,0,.6),0 2px 6px rgba(0,0,0,.3),inset 0 1px 0 var(--glass-hi);
}
/* no backdrop blur? then it's simply solid */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  #dock{--glass:#fff}
  #dock.over-ink{--glass:#1b1b1d}
}

.dock-bar{display:flex;align-items:center;gap:4px;padding:5px}

.dock-bar a,.dock-bar button{
  font:inherit;font-size:11px;letter-spacing:.1em;text-transform:uppercase;line-height:1;
  color:inherit;text-decoration:none;background:none;border:0;cursor:pointer;
  min-height:44px;display:inline-flex;align-items:center;gap:8px;
  padding:0 14px;border-radius:999px;white-space:nowrap;
  transition:background .25s ease,color .25s ease;
}
.dock-bar a:hover,.dock-bar button:hover{background:var(--glass-rule)}
.dock-bar :focus-visible{outline:2px solid currentColor;outline-offset:2px}

/* the menu toggle: two lines that become a cross */
.dock-menu i{position:relative;width:14px;height:8px;display:inline-block}
.dock-menu i::before,.dock-menu i::after{
  content:"";position:absolute;left:0;right:0;height:1.5px;background:currentColor;border-radius:2px;
  transition:top .3s cubic-bezier(.16,1,.3,1),rotate .3s cubic-bezier(.16,1,.3,1);
}
.dock-menu i::before{top:0}
.dock-menu i::after{top:6.5px}
#dock.open .dock-menu i::before{top:3.25px;rotate:45deg}
#dock.open .dock-menu i::after{top:3.25px;rotate:-45deg}

/* the live count: red, because it's counted */
.dock-count{color:var(--glass-fg-2)!important}
.dock-count b{font-weight:400;color:#D42A20;font-variant-numeric:tabular-nums}
#dock.over-ink .dock-count b{color:#FF5A4E}   /* the same red, lifted to read on smoked glass */

/* the ask */
.dock-cta{background:#D42A20!important;color:#fff!important;padding:0 18px!important}
.dock-cta:hover{background:#0C0C0D!important}
#dock.over-ink .dock-cta:hover{background:#fff!important;color:#0C0C0D!important}

/* once the form it points to is on screen, the ask steps back */
.dock-count,.dock-cta{transition:opacity .3s ease,max-width .45s cubic-bezier(.16,1,.3,1),padding .45s cubic-bezier(.16,1,.3,1)}
#dock.at-target .dock-count,#dock.at-target .dock-cta{opacity:0;max-width:0;padding-left:0!important;padding-right:0!important;overflow:hidden;pointer-events:none}

/* desktop links sit inside the bar; the menu toggle is for phones */
.dock-link{display:none!important}
.dock-sep{display:none;width:1px;height:18px;background:var(--glass-rule);margin:0 4px}

/* ── the sheet: the pill flows open into the menu ── */
.dock-sheet{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s cubic-bezier(.16,1,.3,1)}
.dock-sheet > div{overflow:hidden;min-height:0}
#dock.open .dock-sheet{grid-template-rows:1fr}
#dock.open{border-radius:26px;width:min(420px,calc(100vw - 20px))}
.dock-sheet ul{list-style:none;margin:0;padding:14px 10px 4px}
.dock-sheet li + li{border-top:1px solid var(--glass-rule)}
.dock-sheet a{
  display:flex;justify-content:space-between;align-items:baseline;gap:16px;
  padding:13px 10px;min-height:48px;text-decoration:none;color:inherit;
  font-family:"Archivo","Helvetica Neue",Arial,sans-serif;font-weight:700;
  font-variation-settings:"wdth" 108,"wght" 700;font-size:19px;letter-spacing:-.02em;text-transform:uppercase;
}
.dock-sheet a small{
  font-family:"Fragment Mono",ui-monospace,monospace;font-weight:400;font-size:11px;letter-spacing:.08em;
  color:var(--glass-fg-2);font-variation-settings:normal;
}
.dock-sheet a small b{font-weight:400;color:#D42A20}
#dock.over-ink .dock-sheet a small b{color:#FF5A4E}
.dock-sheet .sub a{font-size:15px;font-weight:600;font-variation-settings:"wdth" 104,"wght" 600;padding-left:22px}
.dock-sheet [aria-current="page"]{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}

/* phones: the colophon and the last paragraph mustn't hide under it */
@media (max-width:859px){
  .has-dock #tail{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
  .has-dock #ledger{display:none}
}

/* desktop: top right, links inline, no sheet */
@media (min-width:860px){
  #dock{left:auto;right:var(--gutter,24px);top:12px;bottom:auto;translate:0 0}
  .dock-menu,.dock-sheet{display:none!important}
  .dock-link{display:inline-flex!important}
  .dock-sep{display:block}
  #dock.open{width:max-content}
}

@media (prefers-reduced-motion:reduce){
  #dock,#dock *{transition:none!important}
}
@media print{#dock{display:none}}

/* open, it's a panel you read — the glass frosts over so the page
   behind can't compete with the links */
#dock.open{
  --glass:rgba(255,255,255,.95);
  -webkit-backdrop-filter:blur(34px) saturate(160%);
  backdrop-filter:blur(34px) saturate(160%);
}
#dock.open.over-ink{--glass:rgba(24,24,26,.95)}

/* ══════════════════════════════════════════════════════════
   THE MARK — the wordmark collapses into a solid dot.
   Phones: always the dot. Desktop: the full name at the top of the
   page, the dot once you scroll; hover the dot and the name returns.
   It sits in the top bar's difference blend, so the dot is black on
   paper and white on ink without being told.
   ══════════════════════════════════════════════════════════ */
.brand{
  display:inline-flex;align-items:center;gap:0;
  color:inherit;text-decoration:none;pointer-events:auto;
  padding:14px 10px 14px 0;margin:-14px 0 -14px 0;min-height:44px;
}
.brand-dot{
  width:13px;height:13px;border-radius:50%;background:currentColor;flex:none;
  transform:scale(0);transition:transform .45s cubic-bezier(.16,1,.3,1);
}
.brand-word{
  display:inline-block;overflow:hidden;white-space:nowrap;max-width:32ch;
  transition:max-width .55s cubic-bezier(.16,1,.3,1),opacity .3s ease,margin .55s cubic-bezier(.16,1,.3,1);
}
.brand.is-dot .brand-dot{transform:scale(1)}
.brand.is-dot .brand-word{max-width:0;opacity:0}
.brand.is-dot:hover .brand-word,.brand.is-dot:focus-visible .brand-word{max-width:32ch;opacity:1;margin-left:10px}
@media (max-width:859px){
  .brand .brand-dot{transform:scale(1)}
  .brand .brand-word{max-width:0;opacity:0}
}
@media (prefers-reduced-motion:reduce){.brand-dot,.brand-word{transition:none}}

/* narrow phones: the menu is its icon alone (its name stays "Menu"
   for screen readers), so the count and the ask always fit */
@media (max-width:420px){
  .dock-menu{padding:0 15px!important}
  .dock-menu-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
}
/* the smallest phones: tighter tracking and padding, same words */
@media (max-width:360px){
  .dock-bar a,.dock-bar button{letter-spacing:.04em;padding:0 9px}
  .dock-cta{padding:0 12px!important}
  .dock-menu{padding:0 12px!important}
}
.dock-menu{min-width:44px;justify-content:center}
