/* Buttons you could press (2026-11-20).

   A key on a hard black slab set a little to the side, with a thin light
   rim. Pointing at it lifts it a pixel; pressing pushes it down onto its
   slab. Matte and offset: chosen by the meteorologist on the test site
   (2026-11-20), over a straight slab and a gloss.

     .press              one button (a <button> or a link)
     .press.is-primary   in the accent colour: the one thing to do here
     .press.is-kofi      Ko-fi's coral
     .press-group        a segmented switch: the group is the key, the lit
                         segment sits pushed in

   The front page uses it first; the event pages can take it by loading this
   file. Reads only the tokens in theme.css. */

:root {
  --press-shadow: #000;
  /* The slab's own edge: without it a black slab vanishes on a dark page. */
  --press-shadow-rim: rgb(255 255 255 / 16%);
  --press-rim: rgb(255 255 255 / 42%);
  --press-hi: rgb(255 255 255 / 18%);
  --press-depth: 4px;
  --press-x: 3px;
  --press-gloss: linear-gradient(transparent, transparent);
}

.press {
  --press-bg: var(--surface-2);
  --press-ink: var(--text-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--press-rim);
  border-radius: 999px;
  background: var(--press-gloss), var(--press-bg);
  color: var(--press-ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    var(--press-x) var(--press-depth) 0 0 var(--press-shadow),
    var(--press-x) var(--press-depth) 0 1px var(--press-shadow-rim),
    inset 0 1px 0 var(--press-hi);
  transition: transform 90ms ease, box-shadow 90ms ease, filter 160ms ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.press:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    var(--press-x) calc(var(--press-depth) + 1px) 0 0 var(--press-shadow),
    var(--press-x) calc(var(--press-depth) + 1px) 0 1px var(--press-shadow-rim),
    inset 0 1px 0 var(--press-hi);
}
.press:active {
  filter: brightness(0.96);
  transform: translate(var(--press-x), var(--press-depth));
  box-shadow:
    0 0 0 0 var(--press-shadow),
    0 0 0 1px var(--press-shadow-rim),
    inset 0 2px 3px rgb(0 0 0 / 30%);
}
.press:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.press.is-primary { --press-bg: var(--accent); --press-ink: var(--accent-ink); }
.press.is-kofi { --press-bg: #ff5e5b; --press-ink: #fff; padding: 0.32rem 0.85rem 0.32rem 0.6rem; font-size: 0.82rem; gap: 0.4rem; }
@media (max-width: 520px) {
  .press.is-kofi { padding: 0.28rem 0.65rem 0.28rem 0.5rem; }
  .press-group { padding: 1px; gap: 1px; }
}
.press.is-small { padding: 0.32rem 0.8rem; font-size: 0.82rem; }
.press.is-round { width: 2rem; height: 2rem; padding: 0; border-radius: 50%; --press-depth: 3px; }
.press.is-big { padding: 0.75rem 1.5rem; font-size: 1.05rem; --press-depth: 5px; }

/* A segmented switch: the group is the key; the lit segment is pushed in. */
.press-group {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--press-rim);
  border-radius: 999px;
  background: var(--press-gloss), var(--surface-2);
  box-shadow:
    var(--press-x) var(--press-depth) 0 0 var(--press-shadow),
    var(--press-x) var(--press-depth) 0 1px var(--press-shadow-rim),
    inset 0 1px 0 var(--press-hi);
  overflow: visible;
}
/* Links work as segments too (tabs between pages: the API pages). */
.press-group > button,
.press-group > a {
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.32rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.press-group > button:hover,
.press-group > a:hover { color: var(--text-strong); }
.press-group > button:focus-visible,
.press-group > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.press-group > button.active,
.press-group > button[aria-checked='true'],
.press-group > a[aria-current='page'] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 2px 3px rgb(0 0 0 / 38%), inset 0 -1px 0 rgb(255 255 255 / 22%);
}

@media (prefers-reduced-motion: reduce) {
  .press, .press-group > button { transition: none; }
  .press:hover { transform: none; }
}

/* ---------- The variants panel (static/ab.js), test site only ---------- */

.ab-panel {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 3000;
  width: 17rem;
  padding: 0.6rem 0.75rem 0.5rem;
  border-radius: 12px;
  border: 1px solid #f0c040;
  background: rgb(20 18 10 / 94%);
  color: #f6e7b0;
  font: 0.78rem/1.3 var(--font-body);
  box-shadow: 0 8px 30px rgb(0 0 0 / 50%);
}
.ab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.ab-head b { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; }
.ab-head button { border: 0; background: none; color: inherit; font: inherit; font-size: 1rem; cursor: pointer; padding: 0 0.3rem; }
.ab-row { display: grid; gap: 0.15rem; margin: 0 0 0.45rem; }
.ab-row select { font: inherit; padding: 0.2rem; border-radius: 6px; background: #2a2614; color: #fff; border: 1px solid #6b5a1e; }
.ab-note { margin: 0.2rem 0 0; opacity: 0.7; }
.ab-panel { max-height: calc(100vh - 1.6rem); overflow-y: auto; }
.ab-group { margin: 0.5rem 0 0.3rem; padding-top: 0.35rem; border-top: 1px solid #6b5a1e; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.66rem; color: #f0c040; }
.ab-panel.is-folded .ab-group { display: none; }
.ab-picks { padding-top: 0.45rem; border-top: 1px solid #6b5a1e; }
.ab-picks input { font: 0.7rem/1.3 ui-monospace, monospace; padding: 0.25rem; border-radius: 6px; background: #2a2614; color: #fff; border: 1px solid #6b5a1e; width: 100%; box-sizing: border-box; }
.ab-picks button { margin-top: 0.25rem; padding: 0.3rem; border-radius: 6px; border: 1px solid #f0c040; background: #f0c040; color: #1a1606; font: inherit; font-weight: 800; cursor: pointer; }
.ab-panel.is-folded .ab-row, .ab-panel.is-folded .ab-note { display: none; }
.ab-panel.is-folded .ab-head { margin: 0; }
