/* Pill under glass: the studio shelf recipe (frontend-elements/elements/point-fixed-glass-button.html, 2026-10-24),
   copied verbatim: its :root tokens, then everything between RECIPE START and RECIPE END. Do not edit the look here;
   change the recipe on the shelf and copy it again. Brand tokens are already Altium orange #F58B1D and Barlow. */
  :root{
    /* ── the worded button on the wall (the brand; swap these for another client) ── */
    --pfg-font: "Barlow", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --pfg-weight: 600;
    --pfg-face: #F58B1D;                         /* Altium orange */
    --pfg-face-ink: #171319;                     /* the words (and the chevron) on it */
    --pfg-face-hi: rgba(255, 255, 255, .34);     /* the plate's top lip, catching light */
    --pfg-face-lo: rgba(96, 38, 0, .34);         /* its bottom lip */
    --pfg-face-dark: #232127;                    /* the quiet dark face (.pfg--dark, .pfg-plain) */
    --pfg-face-dark-ink: #f2ede7;
    --pfg-face-dark-rim: rgba(255, 255, 255, .16);
    --pfg-face-off: #b3aea7;                     /* can't be pressed yet: the colour drained out */
    --pfg-face-off-ink: #1f1c1a;
    --pfg-contact: rgba(0, 0, 0, .38);           /* the plate's own small shadow on the wall */
    --pfg-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 11'%3E%3Cpath d='M1.2 1.2 5.6 5.5 1.2 9.8' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    /* ── how the colour and the glass overlap ── */
    --pfg-side: 0;            /* 0 = the colour runs out on the leading (left) side, 1 = trailing (right) */
    --pfg-run: 34px;          /* how far the colour runs out past the glass (the bare tab) */

    /* ── the glass ── */
    --pfg-tint-a: rgba(228, 242, 238, .05);      /* the faint green-blue body of the glass: */
    --pfg-tint-b: rgba(168, 210, 200, .06);      /* nearly clear; the green lives at the edge */
    --pfg-sheen: rgba(255, 255, 255, .13);       /* soft reflection, strongest at the lit corner */
    --pfg-reflect: rgba(255, 255, 255, .07);     /* a broad, soft reflection lying across the pane */
    --pfg-edge-lit: rgba(255, 255, 255, .92);    /* top edge, catching the light */
    --pfg-edge-lit-side: rgba(255, 255, 255, .72);/* left edge */
    --pfg-edge-far: rgba(10, 44, 38, .70);       /* bottom edge, away from the light */
    --pfg-edge-far-side: rgba(10, 44, 38, .55);  /* right edge */
    --pfg-edge-glass: rgba(146, 214, 198, .45);  /* the green-blue of the glass, all round the edge */
    --pfg-edge-round-lit: rgba(255, 255, 255, .30); /* the tight rounded edge: light rolling over it on the lit side */
    --pfg-edge-round-far: rgba(10, 44, 38, .35);    /* and its shade on the far side; about 3px in all, no taper (his word, 10-24) */
    --pfg-edge-outline: rgba(0, 0, 0, .40);      /* the edge's outer face, against the wall or the colour */
    --pfg-saturate: .95;                         /* what's seen through the glass is softened a hair */
    --pfg-bright: 1.05;                          /* by the light the front face reflects */
    --pfg-contrast: .97;
    --pfg-sweep: rgba(255, 255, 255, .36);       /* the band of light on hover */
    --pfg-sweep-time: 2.6s;

    /* ── the glass's shadow on the wall and the colour ── */
    --pfg-shadow-body: rgba(6, 4, 2, .08);       /* faint: light passes through glass */
    --pfg-shadow-edge: rgba(6, 4, 2, .34);       /* darker where the edges turn the light away */
    --pfg-shadow-x: 5px;  --pfg-shadow-y: 7px;  --pfg-shadow-blur: 4.5px;     /* at rest */
    --pfg-shadow-x-in: 1.5px; --pfg-shadow-y-in: 2px; --pfg-shadow-blur-in: 1.5px; /* pressed */

    /* ── the press ── */
    --pfg-press-scale: .968;                     /* pushed toward the wall, it looks a hair smaller */
    --pfg-press-time: 70ms;
    --pfg-spring-time: 460ms;
    --pfg-spring: cubic-bezier(.3, 1.75, .45, 1);/* springs back a little past rest, then settles */

    /* ── focus ring (two tones, so it shows on dark, busy and light walls) ── */
    --pfg-focus: #ffffff;
    --pfg-focus-halo: #0d1a2b;

    /* ── sizes: medium is the default; .pfg--sm and .pfg--lg below swap these ── */
    --pfg-h: 44px;            /* face height */
    --pfg-pad: 22px;          /* words in from the glass edge and from the face's end */
    --pfg-text: 17px;         /* face words */
    --pfg-radius: 999px;      /* face ends: fully round, a pill */
    --pfg-margin: 8px;        /* how far the glass reaches above and below the pill (10 → 8, his "a little tighter", 10-23) */
    --pfg-margin-end: 10px;   /* how far it reaches past the pill's covered end (12 → 10, same word) */
    --pfg-glass-radius: 2px;  /* glass corners: barely eased, not a rounded rectangle (10 → 2, his "less rounded corners", 10-23) */
    --pfg-band: 6px;          /* the width the check measures the glass's edge by (no tapered band now) */
    --pfg-bend: 0;            /* no tapered edge bending what's under it (his word, 10-24); was 16 */
    --pfg-shift: 1;           /* px the colour under the glass sits lower: refraction through its thickness */
    --pfg-magnify: 1.08;      /* the pane is a slight lens: what's under it (the pill, its edges, the words) reads this much
                                 bigger, so the pill's edge steps out where the glass crosses it (his rule, 10-23: what's
                                 under the glass is affected by it; the words never blurred). 1 = flat glass (Chromium) */
  }

  /* ═════════════════════════════ RECIPE START ═════════════════════════════ */
  .pfg--sm{
    --pfg-h: 34px; --pfg-pad: 16px; --pfg-text: 15px; --pfg-margin: 6px; --pfg-margin-end: 8px;
    --pfg-run: 26px; --pfg-glass-radius: 2px; --pfg-band: 5px;
    --pfg-shadow-x: 4px; --pfg-shadow-y: 5px; --pfg-shadow-blur: 3.5px;
  }
  .pfg--lg{
    --pfg-h: 56px; --pfg-pad: 30px; --pfg-text: 20px; --pfg-margin: 10px; --pfg-margin-end: 12px;
    --pfg-run: 42px; --pfg-glass-radius: 3px; --pfg-band: 8px;
    --pfg-shadow-x: 6px; --pfg-shadow-y: 9px; --pfg-shadow-blur: 6px;
  }
  .pfg--run-end{ --pfg-side: 1; }

  /* the button holds the face and the glass. The face starts at the run-out side; the glass covers
     the rest of it and reaches past it above, below and at its covered end. */
  .pfg{
    position: relative; display: inline-flex; align-items: center; vertical-align: middle;
    margin: 0; border: 0; background: none;
    padding: calc(var(--pfg-margin) + var(--pfg-lens-room-y, 0px)) calc((var(--pfg-margin-end) + var(--pfg-lens-room, 0px)) * (1 - var(--pfg-side)))
             calc(var(--pfg-margin) + var(--pfg-lens-room-y, 0px)) calc((var(--pfg-margin-end) + var(--pfg-lens-room, 0px)) * var(--pfg-side));
    border-radius: var(--pfg-glass-radius);
    font: var(--pfg-weight) var(--pfg-text)/1.1 var(--pfg-font); letter-spacing: .01em;
    color: var(--pfg-face-ink); text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    -webkit-user-select: none; user-select: none;
  }
  .pfg > *{ pointer-events: none; }

  /* 1. the coloured, worded pill: flat on the wall, longer than the glass */
  .pfg__face{
    position: relative; display: inline-flex; align-items: stretch;
    min-height: var(--pfg-h); border-radius: var(--pfg-radius);
    background: var(--pfg-face); white-space: nowrap;
    box-shadow:
      inset 0 1px 0 var(--pfg-face-hi),
      inset 0 -1.5px 0 var(--pfg-face-lo),
      0 1px 1px var(--pfg-contact),
      0 1px 3px -1px var(--pfg-contact);
  }
  /* the bare end: the colour running out past the glass, carrying a chevron */
  .pfg__tab{
    order: calc(var(--pfg-side) * 2); flex: none; width: var(--pfg-run);
    display: grid; place-items: center;
  }
  .pfg__tab::before{
    content: ""; width: calc(var(--pfg-h) * .16); height: calc(var(--pfg-h) * .25);
    background: currentColor; opacity: .62;
    -webkit-mask: var(--pfg-chevron) center / contain no-repeat; mask: var(--pfg-chevron) center / contain no-repeat;
  }
  /* the words sit above the glass, so the glass softens everything coloured under it but never them (his word, 10-23) */
  .pfg__words{ order: 1; display: flex; align-items: center; padding: 0 var(--pfg-pad); position: relative; z-index: 2; }

  /* the glass, its edge band and its shadow all cover the same part: everything but the tab */
  .pfg__shadow, .pfg__band, .pfg__glass{
    position: absolute; top: 0; bottom: 0;
    left: calc(var(--pfg-run) * (1 - var(--pfg-side)));
    right: calc(var(--pfg-run) * var(--pfg-side));
    border-radius: var(--pfg-glass-radius);
  }

  /* 2. the glass's own shadow, on the wall and on the colour beneath: faint in the middle,
        darker at the edges; offset away from the light */
  .pfg__shadow{
    background: var(--pfg-shadow-body);
    box-shadow: inset 0 0 0 2px var(--pfg-shadow-edge);
    filter: blur(var(--pfg-shadow-blur));
    transform: translate(var(--pfg-shadow-x), var(--pfg-shadow-y));
    opacity: .9;
    transition: transform var(--pfg-spring-time) var(--pfg-spring), filter var(--pfg-spring-time) ease, opacity var(--pfg-spring-time) ease;
  }

  /* 3. no tapered edge band (his word, 10-24: "Get rid of the taper edge"); the element stays so older markup still works */
  .pfg__band{ display: none; }

  /* 4. the glass pane: no fill of its own; it bends, shifts and lightens what's behind it, carries
        its edges, its reflections and the light sweep */
  .pfg__glass{
    overflow: hidden;
    -webkit-backdrop-filter: saturate(var(--pfg-saturate)) brightness(var(--pfg-bright)) contrast(var(--pfg-contrast));
    backdrop-filter: var(--pfg-bend-url, ) saturate(var(--pfg-saturate)) brightness(var(--pfg-bright)) contrast(var(--pfg-contrast));
    background:
      linear-gradient(108deg, rgba(255, 255, 255, 0) 16%, var(--pfg-reflect) 27%, var(--pfg-reflect) 35%, rgba(255, 255, 255, 0) 47%),
      radial-gradient(130% 160% at 0% 0%, var(--pfg-sheen), rgba(255, 255, 255, .03) 42%, rgba(255, 255, 255, 0) 68%),
      linear-gradient(to bottom right, var(--pfg-tint-a), var(--pfg-tint-b));
    box-shadow:
      inset 0 1px 0 var(--pfg-edge-lit),
      inset 1px 0 0 var(--pfg-edge-lit-side),
      inset 0 -1px 0 var(--pfg-edge-far),
      inset -1px 0 0 var(--pfg-edge-far-side),
      inset 0 0 0 2px var(--pfg-edge-glass),
      inset 1px 1.5px 1.5px -.5px var(--pfg-edge-round-lit),
      inset -1px -1.5px 1.5px -.5px var(--pfg-edge-round-far),
      0 0 0 .5px var(--pfg-edge-outline),
      0 0 0 1.5px rgba(0, 0, 0, .10);
    transition: transform var(--pfg-spring-time) var(--pfg-spring);
  }

  /* hover: one slow band of light crosses the glass (real pointers only, never sticky on a phone) */
  .pfg__sweep{
    position: absolute; top: -30%; bottom: -30%; left: 0; width: 46%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), color-mix(in srgb, var(--pfg-sweep) 45%, transparent) 38%, var(--pfg-sweep) 50%, color-mix(in srgb, var(--pfg-sweep) 45%, transparent) 62%, rgba(255, 255, 255, 0));
    transform: translateX(-130%) skewX(-22deg); opacity: 0;
  }
  @media (hover: hover){
    .pfg:hover:not(:disabled):not([aria-disabled="true"]) .pfg__sweep{ animation: pfg-sweep var(--pfg-sweep-time) cubic-bezier(.35, .15, .65, .85) both; }
  }
  @keyframes pfg-sweep{
    0%  { transform: translateX(-130%) skewX(-22deg); opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100%{ transform: translateX(260%) skewX(-22deg); opacity: 0; }
  }

  /* press: the glass moves toward the button and the wall; its shadow on them pulls in and sharpens.
     Release springs back. */
  .pfg:active:not(:disabled) .pfg__glass, .pfg.is-pressed .pfg__glass,
  .pfg:active:not(:disabled) .pfg__band,  .pfg.is-pressed .pfg__band{
    transform: scale(var(--pfg-press-scale));
    transition: transform var(--pfg-press-time) cubic-bezier(.2, .8, .3, 1);
  }
  .pfg:active:not(:disabled) .pfg__shadow, .pfg.is-pressed .pfg__shadow{
    transform: translate(var(--pfg-shadow-x-in), var(--pfg-shadow-y-in)) scale(var(--pfg-press-scale));
    filter: blur(var(--pfg-shadow-blur-in)); opacity: 1;
    transition: transform var(--pfg-press-time) cubic-bezier(.2, .8, .3, 1), filter var(--pfg-press-time) linear, opacity var(--pfg-press-time) linear;
  }

  /* keyboard: a two-tone ring around the glass and the colour that runs out of it */
  .pfg:focus{ outline: none; }
  .pfg:focus-visible{
    outline: 2.5px solid var(--pfg-focus); outline-offset: 3px;
    box-shadow: 0 0 0 7.5px var(--pfg-focus-halo);
  }

  /* quiet dark face */
  .pfg--dark{ color: var(--pfg-face-dark-ink); }
  .pfg--dark .pfg__face{
    background: var(--pfg-face-dark);
    box-shadow: inset 0 0 0 1px var(--pfg-face-dark-rim), inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 1px var(--pfg-contact), 0 1px 3px -1px var(--pfg-contact);
  }

  /* can't be pressed yet: the glass stays; the colour drains to stone grey and the chevron
     goes, so it reads as "not yet" at a glance; the words stay readable */
  .pfg:disabled, .pfg[aria-disabled="true"]{ cursor: not-allowed; color: var(--pfg-face-off-ink); }
  .pfg:disabled .pfg__face, .pfg[aria-disabled="true"] .pfg__face{
    background: var(--pfg-face-off);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 1px 1px var(--pfg-contact);
  }
  .pfg:disabled .pfg__tab::before, .pfg[aria-disabled="true"] .pfg__tab::before{ visibility: hidden; }

  /* the plain sibling: the same pill, same type, same height; no glass. For everything else. */
  .pfg-plain{
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    min-height: var(--pfg-h); padding: 0 var(--pfg-pad); margin: 0; border: 0;
    border-radius: var(--pfg-radius); white-space: nowrap;
    font: var(--pfg-weight) var(--pfg-text)/1.1 var(--pfg-font); letter-spacing: .01em;
    color: var(--pfg-face-dark-ink); background: var(--pfg-face-dark); text-decoration: none; cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--pfg-face-dark-rim), inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 1px var(--pfg-contact), 0 1px 3px -1px var(--pfg-contact);
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 160ms ease;
  }
  .pfg-plain--brand{
    color: var(--pfg-face-ink); background: var(--pfg-face);
    box-shadow: inset 0 1px 0 var(--pfg-face-hi), inset 0 -1.5px 0 var(--pfg-face-lo), 0 1px 1px var(--pfg-contact), 0 1px 3px -1px var(--pfg-contact);
  }
  .pfg-plain:hover{ background-color: color-mix(in srgb, var(--pfg-face-dark) 86%, #fff); }
  .pfg-plain--brand:hover{ background-color: color-mix(in srgb, var(--pfg-face) 90%, #fff); }
  .pfg-plain:active, .pfg-plain.is-pressed{ transform: translateY(1px); box-shadow: inset 0 0 0 1px var(--pfg-face-dark-rim), 0 0 1px var(--pfg-contact); }
  .pfg-plain--brand:active, .pfg-plain--brand.is-pressed{ box-shadow: inset 0 -1px 0 var(--pfg-face-lo), 0 0 1px var(--pfg-contact); }
  .pfg-plain:focus{ outline: none; }
  .pfg-plain:focus-visible{ outline: 2.5px solid var(--pfg-focus); outline-offset: 3px; box-shadow: 0 0 0 7.5px var(--pfg-focus-halo); }
  .pfg-plain:disabled{ cursor: not-allowed; background: var(--pfg-face-off); color: var(--pfg-face-off-ink); }

  /* reduced motion: no light sweep, and the press is instant both ways */
  @media (prefers-reduced-motion: reduce){
    .pfg__sweep{ display: none; }
    .pfg__glass, .pfg__band, .pfg__shadow, .pfg-plain,
    .pfg:active .pfg__glass, .pfg.is-pressed .pfg__glass, .pfg:active .pfg__band, .pfg.is-pressed .pfg__band,
    .pfg:active .pfg__shadow, .pfg.is-pressed .pfg__shadow{ transition: none !important; }
  }
  /* ══════════════════════════════ RECIPE END ══════════════════════════════ */
