/* Button designs, switchable from /content.json.
 *
 * theme.buttons in the JSON picks one of six:
 *
 *   "stack"    the design the site ships in -- a solid fill sitting on a
 *              darker bar that the button presses down into. Nothing in this
 *              file applies; the Tailwind utilities in the markup are the
 *              whole design.
 *   "riser"    the same design, tuned -- the one that is meant to read as a
 *              sibling of "stack" rather than a replacement. Same bar, 10px
 *              corners instead of 12, a hairline keyline, and the motion the
 *              original never had: the button rises off its bar on hover and
 *              presses all the way flat onto it on click.
 *   "edge"     Precision Edge -- dimensional. Tighter corners, a lit top
 *              lip, a hairline keyline, and a brand-tinted shadow the button
 *              lifts out of on hover. (It once had a sheen crossing the face
 *              as well; that is switched off -- see "the sheen" below.)
 *   "capsule"  Capsule -- flat. Full pill, no shadow at rest, a brand halo
 *              that springs open on hover and a squish on press.
 *   "sweep"    Sweep -- flat and wide-cornered. Nothing at rest but the fill
 *              and a hairline; on hover a deeper rung wipes across the face
 *              from the left, under the label.
 *   "ledger"   Ledger -- rectangular and instrument-like, and what the site
 *              wears now. 2px corners, no bar, no shadow, a hairline of the
 *              fill's own colour taken down a rung, and no motion at all:
 *              colour is the whole of the feedback. Brings the marketing
 *              pages toward the logged-in workbench, where nothing is
 *              rounded and depth is a border rather than a blur.
 *
 * /theme.js reads the value in <head> and puts it on <html> as data-buttons
 * before the first paint, so switching is a one-word edit to content.json and
 * a reload. "stack" (or a missing value) sets no attribute at all, so the
 * shipped design costs nothing.
 *
 * ---- how these hook onto the markup --------------------------------------
 * There is no .btn class on this site: every button is a pair of elements
 * styled inline with Tailwind. A shell <div> carries `pb-1` and a dark
 * background -- that is the bar under the button -- and wraps a face
 * (<a>, <button>, or a <div> inside a card-wide link) carrying the same
 * corner radius and the fill. All 69 of them across the site match
 * `[class~="pb-1"][class*="rounded-["]`, and nothing else does, so that pair
 * is what the rules below are written against. Which colour a face is comes
 * off its own fill utility: bg-[#ff5c00] brand, bg-[#191919] ink, bg-white
 * outline. The submit buttons on /login and /signup come from the app's
 * own component and fill with bg-btn-orange instead -- a token, but the same
 * #ff5c00 -- so the brand rules match that name too.
 *
 * Rules here are deliberately unlayered. Tailwind's output lives in
 * @layer utilities, and an unlayered declaration outranks every layered one
 * whatever its specificity -- which is what lets these override bg-[#ff5c00]
 * and active:mt-1 without a single !important.
 *
 * ---- colours -------------------------------------------------------------
 * Every orange below is a rung of the ladder in /theme.js (#fff1e8, #ffdecc,
 * #ff9d66, #ff7d33, #ff5c00, #cc4a00, #b84200), written as a hex or as the
 * rgba of one. That is what makes them retint with theme.primary along with
 * the rest of the site. Adding an orange that is not a rung will leave it
 * behind on a brand change.
 *
 * ---- what is deliberately left alone -------------------------------------
 * The buttons drawn inside the product screenshots on the homepage size
 * themselves in container units (`pb-[0.5cqw]`) and are pictures of the app,
 * not site buttons, so they keep the stacked look under every variant. */

/* ======================================================== shared scaffold -- */

/* The bar belongs to the stacked family. The three designs that are not in it
 * take it away: the shell stops painting, stops reserving the 4px, and stops
 * shifting the button down on press (active:mt-1 / active:pb-0 in the
 * markup). "riser" keeps the bar and is handled in its own section. */
:root[data-buttons="edge"] [class~="pb-1"][class*="rounded-["],
:root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["],
:root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["],
:root[data-buttons="ledger"] [class~="pb-1"][class*="rounded-["] {
  background-color: transparent;
  padding-bottom: 0;
  margin-top: 0;
}

/* The face becomes the whole button. It has to be a positioning and stacking
 * context of its own for the sheen, the halo and the wipe, and `isolation`
 * keeps those from being composited against whatever the button is sitting
 * on -- it is also what lets the wipe sit at z-index -1, above the face's own
 * background but under its label. */
:root[data-buttons="edge"] [class~="pb-1"][class*="rounded-["] > *,
:root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["] > *,
:root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *,
:root[data-buttons="ledger"] [class~="pb-1"][class*="rounded-["] > * {
  position: relative;
  isolation: isolate;
  transform-origin: center;
  border-style: solid;
}

/* One focus ring for all of them, since a keyboard ring should not change
 * meaning when the design does. Offset rather than inset so it clears the
 * pill. */
:root[data-buttons] [class~="pb-1"][class*="rounded-["] > *:focus-visible {
  outline: 2px solid #ff5c00;
  outline-offset: 3px;
}

/* =========================================================== 1. riser ----- */
/* The near neighbour. Everything that makes the stacked design what it is
 * stays -- the fill, the bar, the colour of both -- and the changes are the
 * ones you would make on a second pass: corners pulled in two pixels, a
 * hairline so the fill has an edge rather than just ending, and a hover.
 *
 * The bar is not resized to animate. The face is moved instead, so nothing
 * reflows: lifting it uncovers more of the shell behind it and the bar reads
 * thicker, and dropping it the full 4px covers the bar completely, which is
 * the flattest a button on this site can look. */

:root[data-buttons="riser"] [class~="pb-1"][class*="rounded-["] {
  border-radius: 10px;
  /* Both fixed, so the markup's active:mt-1 / active:pb-0 cannot fire on top
   * of the face's own travel and double it. */
  padding-bottom: 4px;
  margin-top: 0;
}
:root[data-buttons="riser"] [class~="pb-1"][class*="rounded-["] > * {
  border-radius: 10px;
  transform-origin: center;
  transition:
    transform 140ms cubic-bezier(0.2, 0, 0.2, 1),
    box-shadow 140ms cubic-bezier(0.2, 0, 0.2, 1),
    background-color 140ms linear;
}
:root[data-buttons="riser"] [class~="pb-1"][class*="rounded-["] > *:hover {
  transform: translateY(-3px);
}
:root[data-buttons="riser"] [class~="pb-1"][class*="rounded-["] > *:active {
  transform: translateY(4px);   /* exactly the bar: it disappears underneath */
  transition-duration: 70ms;
}

/* The hairline is the face's own colour taken down a rung, so it reads as an
 * edge rather than as a border someone added. */
:root[data-buttons="riser"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]) {
  box-shadow: inset 0 0 0 1px rgba(184, 66, 0, 0.4);
}
:root[data-buttons="riser"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):active {
  background-color: #cc4a00;
  box-shadow: inset 0 1px 3px rgba(184, 66, 0, 0.5);
}
:root[data-buttons="riser"] [class~="pb-1"] > [class*="bg-[#191919]"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
:root[data-buttons="riser"] [class~="pb-1"] > [class*="bg-[#191919]"]:active {
  background-color: #191919;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
:root[data-buttons="riser"] [class~="pb-1"] > [class*="bg-white"]:hover {
  background-color: #ffffff;      /* not the grey the markup reaches for */
  border-color: #ffc9a3;
}
:root[data-buttons="riser"] [class~="pb-1"] > [class*="bg-white"]:active {
  background-color: #fff1e8;
  border-color: #ffbe99;
}

/* ============================================================ 2. edge ------ */
/* Dimensional and tight. The button reads as a physical key: lit along the
 * top lip, cut by a hairline of its own colour darkened, floating on a
 * shadow tinted with the brand rather than a neutral grey. It used to have a
 * sheen as well -- a narrow diagonal highlight crossing the face once on
 * hover -- which is now off; the rules are kept at "the sheen" below. */

:root[data-buttons="edge"] [class~="pb-1"][class*="rounded-["] > * {
  /* 8px against the markup's 12px. The tighter corner is most of what tells
   * this design apart from the stacked one at rest, so it is worth the two
   * pixels. */
  border-radius: 8px;
  border-width: 0;
  overflow: hidden;                       /* clipped the sheen to the corners */
  transition:
    transform 150ms cubic-bezier(0.2, 0, 0.2, 1),
    box-shadow 150ms cubic-bezier(0.2, 0, 0.2, 1),
    background-color 150ms linear;
}

/* -- brand ---------------------------------------------------------------- */
:root[data-buttons="edge"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]) {
  background-image: linear-gradient(180deg, #ff9d66 0%, #ff7d33 22%, #ff5c00 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),   /* the lit top lip */
    inset 0 0 0 1px rgba(184, 66, 0, 0.55),   /* #b84200 keyline */
    0 1px 2px rgba(25, 25, 25, 0.1),
    0 6px 16px -3px rgba(255, 92, 0, 0.5);
}
:root[data-buttons="edge"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):hover {
  background-color: #ff5c00;
  background-image: linear-gradient(180deg, #ff9d66 0%, #ff7d33 72%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 0 0 1px rgba(184, 66, 0, 0.42),
    0 2px 4px rgba(25, 25, 25, 0.08),
    0 9px 20px -4px rgba(255, 92, 0, 0.48);
}
:root[data-buttons="edge"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):active {
  background-image: linear-gradient(180deg, #ff5c00 0%, #ff7d33 100%);
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 5px rgba(184, 66, 0, 0.55),   /* the lip goes dark: pressed */
    inset 0 0 0 1px rgba(184, 66, 0, 0.6),
    0 1px 1px rgba(25, 25, 25, 0.06);
}

/* -- ink ------------------------------------------------------------------ */
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-[#191919]"] {
  background-image: linear-gradient(180deg, #4a4a4a 0%, #333333 22%, #191919 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(25, 25, 25, 0.12),
    0 6px 16px -3px rgba(25, 25, 25, 0.34);
}
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-[#191919]"]:hover {
  background-color: #191919;
  background-image: linear-gradient(180deg, #4a4a4a 0%, #2a2a2a 72%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    0 2px 4px rgba(25, 25, 25, 0.1),
    0 9px 20px -4px rgba(25, 25, 25, 0.34);
}
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-[#191919]"]:active {
  background-image: linear-gradient(180deg, #191919 0%, #333333 100%);
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 1px 1px rgba(25, 25, 25, 0.08);
}

/* -- outline -------------------------------------------------------------- */
/* No gradient: a white button that is shaded reads as disabled. It gets its
 * dimension from the keyline and the shadow instead. */
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-white"] {
  background-image: none;
  box-shadow:
    inset 0 0 0 1px #d6d6d6,
    0 1px 2px rgba(25, 25, 25, 0.07),
    0 6px 16px -4px rgba(25, 25, 25, 0.16);
}
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-white"]:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 157, 102, 0.9),  /* #ff9d66: brand, quietly */
    0 2px 4px rgba(25, 25, 25, 0.06),
    0 9px 20px -4px rgba(25, 25, 25, 0.16);
}
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-white"]:active {
  background-color: #fff1e8;
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(25, 25, 25, 0.1),
    inset 0 0 0 1px #ffc9a3;
}

/* -- the sheen ------------------------------------------------------------ */
/* OFF. The highlight that crossed the face on hover has been switched off;
 * the lift, the gradient and the brand-tinted shadow are the hover feedback
 * now. Kept here rather than deleted so it can come back as one uncomment --
 * the @keyframes and the reduced-motion override below are still in place.
 *
 * Filled faces only, when it is on. On white there is nothing for a white
 * highlight to be brighter than, so it would just look like a smear. */
/*
:root[data-buttons="edge"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"])::after,
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-[#191919]"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    100deg,
    transparent 38%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 62%);
}
:root[data-buttons="edge"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):hover::after,
:root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-[#191919]"]:hover::after {
  animation: pika-btn-sheen 620ms cubic-bezier(0.3, 0, 0.2, 1);
}
*/
@keyframes pika-btn-sheen {
  from { opacity: 1; transform: translateX(-160%); }
  to   { opacity: 1; transform: translateX(160%); }
}

/* ========================================================= 3. capsule ----- */
/* Flat and quiet at rest -- no shadow, no gradient, nothing but the fill and
 * a full pill -- so a page of them stays calm. All the play is in the
 * response: the halo springs open past its resting size on hover and settles
 * back, and the whole button squishes on press. */

:root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["] > * {
  border-radius: 999px;
  border-width: 0;
  box-shadow: 0 0 0 0 rgba(255, 92, 0, 0);
  /* The overshoot in the hover curve is the spring. Press uses a plain ease
   * on a shorter clock: a button that bounces under your finger feels loose. */
  transition:
    transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 260ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 140ms linear;
}
:root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["] > *:hover {
  transform: translateY(-1px) scale(1.025);
  /* The ring is the halo, the second shadow is what stops it looking like a
   * sticker on a dark band. Both are the brand, so this is the one moment a
   * white or ink button admits which site it is on. */
  box-shadow:
    0 0 0 5px rgba(255, 92, 0, 0.22),
    0 8px 20px -6px rgba(255, 92, 0, 0.45);
}
:root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["] > *:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.34);
  transition-duration: 90ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0.3, 1);
}

/* The fills stay flat; only the rungs move, so the hue never drifts. */
:root[data-buttons="capsule"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):hover { background-color: #ff7d33; }
:root[data-buttons="capsule"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):active { background-color: #cc4a00; }
:root[data-buttons="capsule"] [class~="pb-1"] > [class*="bg-[#191919]"]:hover { background-color: #2a2a2a; }
:root[data-buttons="capsule"] [class~="pb-1"] > [class*="bg-[#191919]"]:active { background-color: #4a4a4a; }

/* The outline face has no fill to lighten, so its hover is the brand wash --
 * the one place the halo alone would leave it looking inert. */
:root[data-buttons="capsule"] [class~="pb-1"] > [class*="bg-white"] {
  border-width: 1px;
  border-color: #e1e1e1;
}
:root[data-buttons="capsule"] [class~="pb-1"] > [class*="bg-white"]:hover {
  background-color: #fff1e8;
  border-color: #ffc9a3;
}
:root[data-buttons="capsule"] [class~="pb-1"] > [class*="bg-white"]:active {
  background-color: #ffdecc;
  border-color: #ffbe99;
}

/* =========================================================== 4. sweep ----- */
/* The quietest of the five at rest -- a wide 14px corner, the flat fill, and
 * a hairline. No bar, no shadow, no gradient. The whole design is the hover:
 * a deeper rung of the same colour wipes across the face from the left,
 * behind the label, the way a progress fill lands. It reads as the button
 * committing rather than the button reacting, which is a different kind of
 * play from a bounce -- and it is the one variant whose motion still works if
 * you are looking away from the cursor. */

:root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > * {
  border-radius: 14px;
  border-width: 0;
  overflow: hidden;                       /* clips the wipe to the corners */
  transition:
    box-shadow 200ms ease,
    transform 120ms ease,
    background-color 200ms linear;
}

/* The wipe. z-index -1 puts it above the face's own background and below its
 * label -- possible only because the face isolates, above. */
:root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
}
:root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *:hover::before {
  transform: scaleX(1);
}
:root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *:active {
  transform: scale(0.99);
}

/* -- brand ---------------------------------------------------------------- */
:root[data-buttons="sweep"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]) {
  box-shadow: inset 0 0 0 1px rgba(184, 66, 0, 0.35);
}
:root[data-buttons="sweep"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"])::before {
  background-color: #cc4a00;
}
:root[data-buttons="sweep"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):hover {
  background-color: #ff5c00;              /* the wipe is the hover, not this */
  box-shadow:
    inset 0 0 0 1px rgba(184, 66, 0, 0.55),
    0 6px 18px -6px rgba(255, 92, 0, 0.45);
}

/* -- ink ------------------------------------------------------------------ */
/* Ink wipes lighter. Going darker on near-black is a change nobody sees. */
:root[data-buttons="sweep"] [class~="pb-1"] > [class*="bg-[#191919]"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
:root[data-buttons="sweep"] [class~="pb-1"] > [class*="bg-[#191919]"]::before {
  background-color: #4a4a4a;
}
:root[data-buttons="sweep"] [class~="pb-1"] > [class*="bg-[#191919]"]:hover {
  background-color: #191919;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 6px 18px -6px rgba(25, 25, 25, 0.4);
}

/* -- outline -------------------------------------------------------------- */
:root[data-buttons="sweep"] [class~="pb-1"] > [class*="bg-white"] {
  box-shadow: inset 0 0 0 1px #e1e1e1;
}
:root[data-buttons="sweep"] [class~="pb-1"] > [class*="bg-white"]::before {
  background-color: #fff1e8;
}
:root[data-buttons="sweep"] [class~="pb-1"] > [class*="bg-white"]:hover {
  background-color: #ffffff;
  box-shadow:
    inset 0 0 0 1px #ffc9a3,
    0 6px 18px -6px rgba(25, 25, 25, 0.14);
}

/* =========================================================== 5. ledger ---- */
/* Ledger -- rectangular and instrument-like. The quietest design in the file
 * and the only one with no motion at all: the corner comes in to 2px, the bar
 * and every blur shadow go, and what is left is a fill and a hairline of that
 * fill's own colour taken down a rung, so the button reads as a key cut out of
 * the page rather than an object floating above it.
 *
 * It is here to bring the marketing pages a little way toward the logged-in
 * workbench, where nothing is rounded and depth is a 1px border rather than a
 * shadow. Feedback is carried entirely by colour -- a rung lighter on hover, a
 * rung darker plus an inset press on click -- which is why this design has no
 * entry in the reduced-motion block below: there is nothing there to take away.
 *
 * 2px rather than 0: at square the face's corners collide with the focus ring
 * and, at the sizes the hero uses, a fully square button reads as an unstyled
 * input rather than a deliberate one. Two pixels is enough to look cut. */

:root[data-buttons="ledger"] [class~="pb-1"][class*="rounded-["] > * {
  border-radius: 2px;
  border-width: 0;
  transition: background-color 120ms linear, box-shadow 120ms linear;
}

/* -- brand ---------------------------------------------------------------- */
:root[data-buttons="ledger"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]) {
  box-shadow: inset 0 0 0 1px #b84200;
}
:root[data-buttons="ledger"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):hover {
  background-color: #ff7d33;
  box-shadow: inset 0 0 0 1px #cc4a00;
}
:root[data-buttons="ledger"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):active {
  background-color: #cc4a00;
  box-shadow: inset 0 0 0 1px #b84200, inset 0 2px 4px rgba(184, 66, 0, 0.55);
}

/* -- ink ------------------------------------------------------------------ */
/* A dark fill on a light page already has an edge against the page, so the
 * hairline goes on the inside in white: it is what keeps this button a sibling
 * of the brand one rather than a plain black rectangle. */
:root[data-buttons="ledger"] [class~="pb-1"] > [class*="bg-[#191919]"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
:root[data-buttons="ledger"] [class~="pb-1"] > [class*="bg-[#191919]"]:hover {
  background-color: #333333;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
:root[data-buttons="ledger"] [class~="pb-1"] > [class*="bg-[#191919]"]:active {
  background-color: #191919;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* -- outline -------------------------------------------------------------- */
/* The hairline is the whole button here, so it is a full-strength rule rather
 * than the wash the filled faces carry. */
:root[data-buttons="ledger"] [class~="pb-1"] > [class*="bg-white"] {
  box-shadow: inset 0 0 0 1px #d6d6d6;
}
:root[data-buttons="ledger"] [class~="pb-1"] > [class*="bg-white"]:hover {
  background-color: #ffffff;
  box-shadow: inset 0 0 0 1px #ffc9a3;
}
:root[data-buttons="ledger"] [class~="pb-1"] > [class*="bg-white"]:active {
  background-color: #fff1e8;
  box-shadow: inset 0 0 0 1px #ffbe99, inset 0 2px 4px rgba(25, 25, 25, 0.1);
}

/* ================================================== reduced motion -------- */
/* The lift, the squish and the sheen are decoration; the colour changes are
 * the feedback. Keep the second, drop the first. */
@media (prefers-reduced-motion: reduce) {
  /* The :hover and :active rules above outrank a bare base selector, so the
   * states have to be named here too or the lift survives. */
  :root[data-buttons="riser"] [class~="pb-1"][class*="rounded-["] > *,
  :root[data-buttons="riser"] [class~="pb-1"][class*="rounded-["] > *:hover,
  :root[data-buttons="riser"] [class~="pb-1"][class*="rounded-["] > *:active,
  :root[data-buttons="edge"] [class~="pb-1"][class*="rounded-["] > *,
  :root[data-buttons="edge"] [class~="pb-1"][class*="rounded-["] > *:hover,
  :root[data-buttons="edge"] [class~="pb-1"][class*="rounded-["] > *:active,
  :root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["] > *,
  :root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["] > *:hover,
  :root[data-buttons="capsule"] [class~="pb-1"][class*="rounded-["] > *:active,
  :root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *,
  :root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *:hover,
  :root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *:active {
    transition: background-color 140ms linear, box-shadow 140ms linear;
    transform: none;
  }
  /* Inert while the sheen is off, and kept for when it is put back. */
  :root[data-buttons="edge"] [class~="pb-1"] > :is([class*="bg-[#ff5c00]"], [class*="bg-btn-orange"]):hover::after,
  :root[data-buttons="edge"] [class~="pb-1"] > [class*="bg-[#191919]"]:hover::after {
    animation: none;
  }
  /* Sweep is the exception: the wipe is the only hover feedback it has, so it
   * is kept and made instant rather than dropped. */
  :root[data-buttons="sweep"] [class~="pb-1"][class*="rounded-["] > *::before {
    transition: none;
  }
}

/* ------------------------------------------------------------ chip taps --
 * The capability chips are the main thing there is to tap on the homepage
 * and on /products -- the page tells you so ("Click any chip in a package to
 * see what it means") -- but at 12px type and py-1 they come out 20px high,
 * less than half the 44px a fingertip needs.
 *
 * The pill grows a little on a touch screen, and an invisible ::after carries
 * the target the rest of the way. 44px on a 32px pill reaches 6px past it on
 * each side, which stays inside the 8-12px gap between chip rows, so no two
 * chips ever claim the same tap. Nothing moves on a pointer device.
 */
@media (pointer: coarse) {
  .chip-hit {
    min-height: 32px;
  }
  .chip-hit::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 44px;
    transform: translateY(-50%);
  }
}
