/* Snug: the stage header, for the Snug themes that ask for it ('header' => 'stage'). The layout puts "head-stage" on
   <body> and draws, under a top bar that keeps only the search link, the light/dark button and the menu button: the
   author's picture large (or the blog's logo, or a letter), the blog's name and tagline under it, and the menu as a
   dial (dial.js). A theme gives it its character with its own styles; this file is the shape they share.
   The stage is the same on every page of the blog, the front page and the rest alike. --stage-face: the picture's size. --dial-w: how wide the dial may be. --dial-gap: the space between its links.
   --dial-mid: the width of the link in the middle (set by dial.js), for a mark drawn behind it. */
.head-stage{--stage-face:136px;--dial-w:34rem;--dial-gap:clamp(20px,3vw,32px)}

/* the top bar: only the buttons, clear until the page is scrolled */
.site-head.stage-bar{pointer-events:none}
.site-head.stage-bar:not(.scrolled){background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}
.stage-bar .head-tools{margin-left:auto;pointer-events:auto}

.stage{position:relative;margin-top:-30px;padding-bottom:clamp(14px,2.4vw,24px);text-align:center}
.stage-in{display:grid;justify-items:center;gap:clamp(16px,2.4vw,22px)}
.stage-brand{display:grid;justify-items:center;gap:clamp(12px,2vw,18px);min-width:0;max-width:100%;color:var(--ink);text-decoration:none}
.stage-face{display:grid;place-items:center;width:var(--stage-face);height:var(--stage-face);border-radius:50%;overflow:hidden;background:var(--paper-2);box-shadow:0 0 0 1px var(--rule)}
.stage-avatar{display:block;width:100%;height:100%;object-fit:cover}
.stage-mono{color:var(--accent);font:700 calc(var(--stage-face)*.44)/1 var(--font-head);-webkit-user-select:none;user-select:none}
.stage-logo{display:block;width:auto;height:calc(clamp(60px,11vw,96px)*var(--logo-size,1));max-width:min(78vw,26rem);object-fit:contain}
.stage .brand-text{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;max-width:100%;line-height:1.15}
.stage .brand-name{max-width:100%;white-space:normal;overflow:visible;overflow-wrap:anywhere;text-wrap:balance;font-family:var(--font-head);font-weight:700;font-size:clamp(1.9rem,5.2vw,3rem);letter-spacing:-.015em}
.stage .brand-tagline{display:block;max-width:34em;white-space:normal;overflow:visible;-webkit-line-clamp:none;line-clamp:none;text-wrap:balance;color:var(--ink-2);font-size:clamp(.95rem,1.5vw,1.05rem);font-weight:400;line-height:1.45;letter-spacing:0}

/* the dial: as the page has it, one row of links that scrolls sideways where it does not fit */
.dial{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px;width:min(100%,var(--dial-w));font-size:.95rem}
.dial-view{grid-column:2;min-width:0;padding:3px 0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
.dial-view::-webkit-scrollbar{display:none}
.dial-track{position:relative;display:flex;justify-content:safe center;gap:var(--dial-gap);width:max-content;min-width:100%;margin:0;padding:0 var(--dial-gap);list-style:none}
.dial-item{flex:none}
.dial-item a{display:block;padding:10px 2px;color:var(--ink-2);text-decoration:none;white-space:nowrap;border-radius:6px;transition:color .2s}
.dial-item a:hover{color:var(--ink)}
.dial-item a:focus-visible{outline-offset:-1px}
.dial-item.is-current a{color:var(--accent);font-weight:650}
.dial-step{appearance:none;-webkit-appearance:none;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink-2);cursor:pointer;transition:color .2s,background-color .2s}
.dial-step:hover{background:var(--paper-2);color:var(--ink)}
.dial-prev{grid-column:1}
.dial-next{grid-column:3}

/* turning: the list repeated either side, moved as one, the links fading towards the ends */
.dial.is-live .dial-view{overflow:hidden;touch-action:pan-y;cursor:grab;-webkit-user-select:none;user-select:none;-webkit-mask-image:linear-gradient(90deg,transparent,#000 17%,#000 83%,transparent);mask-image:linear-gradient(90deg,transparent,#000 17%,#000 83%,transparent)}
.dial.is-live .dial-track{justify-content:flex-start;min-width:0;padding:0;will-change:transform}
.dial.is-dragging .dial-view{cursor:grabbing}
.dial.is-live .dial-item.is-centre a{color:var(--ink)}
.dial.is-live .dial-item.is-centre.is-current a{color:var(--accent)}
.dial.is-live::after{content:"";position:absolute;left:50%;bottom:0;width:22px;height:2px;margin-left:-11px;border-radius:2px;background:var(--accent);pointer-events:none} /* the middle of the dial */
@media (prefers-reduced-motion:no-preference){
  .dial.is-live .dial-item{transform:scale(calc(1 - var(--d,0)*.2));opacity:calc(1 - var(--d,0)*.5)}
}

/* phones: a smaller picture under the buttons, the dial for a thumb */
@media (max-width:600px){
  .head-stage{--stage-face:104px;--dial-gap:20px}
  .stage-bar .head-row{min-height:56px}
  .stage{margin-top:-4px}
  .dial-step{display:none}
  .dial{grid-template-columns:0 minmax(0,1fr) 0;gap:0}
  .dial-item a{padding:12px 2px}
}

/* The owner's own bar in the dial's place (Snug\MenuStyle::overStage(); "has-bar" on <body>): the bar as on any blog,
   and the stage under it with the picture, the name and the tagline. The bar's own name would say the name twice, so
   it keeps its place and waits, unseen, until the stage's name has gone up under the bar (site.js: .past-stage). */
.has-bar .stage{margin-top:0;padding-top:clamp(28px,4vw,44px)}
.has-bar .site-head .brand{opacity:0;visibility:hidden;transition:opacity .3s var(--ease),visibility 0s .3s}
.has-bar .site-head.past-stage .brand{opacity:1;visibility:visible;transition:opacity .3s var(--ease)}
@media (max-width:600px){.has-bar .stage{margin-top:0}}
