/* ParametricTypes · liquid glass buttons, shared by the web and the app (see glass.js).
   A square Swiss block made of glass: edges that refract, a specular rim, inner volume, a light that follows the pointer. */
.glass { --g-tint: rgba(255, 255, 255, .12); --g-fg: #141414; --g-rim: rgba(255, 255, 255, .95); --g-rim-2: rgba(255, 255, 255, .18);
  --g-blur: blur(6px) saturate(200%) brightness(1.05);
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 48px; padding: 0 22px; border: 0; border-radius: var(--g-r, 10px); color: var(--g-fg); background: var(--g-tint);
  font: 600 15px/1 "Helvetica Neue", Helvetica, "Heros", Arial, sans-serif; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 0 14px rgba(255, 255, 255, .35), 0 .5px 0 rgba(20, 20, 20, .1), 0 10px 26px -14px rgba(20, 20, 20, .32);
  transition: transform 160ms cubic-bezier(.23, 1, .32, 1), box-shadow .25s cubic-bezier(.23, 1, .32, 1), background-color .25s }
/* Chromium: the backdrop is refracted at the edges by the element's own displacement map */
.glass-refract .glass { -webkit-backdrop-filter: var(--glass-filter, none) var(--g-blur); backdrop-filter: var(--glass-filter, none) var(--g-blur) }
/* the specular rim: a 1 px ring, bright where the light hits (top left), faint at the far edges */
.glass::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(135deg, var(--g-rim) 0%, var(--g-rim-2) 32%, rgba(255, 255, 255, 0) 55%, var(--g-rim-2) 82%, rgba(255, 255, 255, .55) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0) }
/* a soft light that follows the pointer across the glass */
.glass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); mix-blend-mode: soft-light }
.glass > * { position: relative; z-index: 2 }
.glass > .arrow::before { content: none }
.glass { background-image: linear-gradient(180deg, rgba(255, 255, 255, .5) 0, rgba(255, 255, 255, 0) 2px), radial-gradient(120% 70% at 18% -20%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%) }
.glass .arrow { font-weight: 400; transition: transform .25s cubic-bezier(.23, 1, .32, 1) }
@media (hover: hover) and (pointer: fine) {
  .glass:hover::after { opacity: 1 }
  .glass:hover .arrow { transform: translateX(3px) }
  .glass[href^="#"]:hover .arrow { transform: translateY(2px) } }
.glass:active { transform: scale(.97) }
.glass:focus-visible { outline: 2px solid #C24A3E; outline-offset: 3px }
/* red glass: the one action; tinted enough that white text keeps ≥ 4.5:1 */
.glass--red { --g-tint: rgba(142, 48, 39, .9); --g-fg: #fff; --g-rim: rgba(255, 214, 206, .95); --g-rim-2: rgba(255, 190, 180, .2);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 190, .22), inset 0 1px 0 rgba(255, 225, 215, .4), 0 .5px 0 rgba(60, 10, 6, .15), 0 12px 28px -14px rgba(120, 30, 22, .45);
  background-image: linear-gradient(180deg, rgba(255, 210, 200, .45) 0, rgba(255, 210, 200, 0) 2px), radial-gradient(120% 70% at 18% -20%, rgba(255, 200, 185, .28), rgba(255, 200, 185, 0) 45%) }
.glass--red::after { mix-blend-mode: screen; background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 220, 210, .35), rgba(255, 220, 210, 0) 70%) }
/* on ink (dark chapters, the dark workshop, the red closing field) the clear glass turns light-on-dark */
.glass--dark, [data-tone="ink"] .glass:not(.glass--red) { --g-tint: rgba(255, 255, 255, .08); --g-fg: #F4F3EF; --g-rim: rgba(255, 255, 255, .7); --g-rim-2: rgba(255, 255, 255, .1) }
.glass--sm { height: 40px; padding: 0 16px; font-size: 14px }
@media (prefers-reduced-transparency: reduce) { .glass { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; --g-tint: #F4F3EF } .glass--red { --g-tint: #B23E34 } }

/* transparency first: the clear block is only light on glass — a crisp rim, a top highlight, a whisper of shadow */
.glass:not(.glass--red) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(20, 20, 20, .06), 0 0 0 1px rgba(20, 20, 20, .07), 0 8px 22px -14px rgba(20, 20, 20, .3) }

/* ---------- v3: glass you can see on plain paper ----------
   With nothing behind to refract, glass reads by what it does with light: a specular band on its top half, a bright
   top edge and a caught light at the foot, volume at its base, a translucent tint, and — on the red — light that
   passes through and tints its own shadow. */
.glass.glass { background-color: var(--g-tint);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .16) 46%, rgba(255, 255, 255, 0) 52%, rgba(255, 255, 255, .1) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -1px 1px rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(255, 255, 255, .42),
    inset 0 -10px 16px -12px rgba(20, 20, 20, .22), 0 1px 1px rgba(20, 20, 20, .08), 0 14px 26px -14px rgba(20, 20, 20, .34);
  --g-tint: rgba(255, 255, 255, .34); --g-blur: blur(5px) saturate(170%) }
.glass.glass--red { --g-tint: rgba(176, 54, 42, .8); --g-fg: #fff; text-shadow: 0 1px 0 rgba(80, 12, 6, .35);
  background-image: linear-gradient(180deg, rgba(255, 196, 182, .58) 0%, rgba(255, 170, 152, .18) 46%, rgba(255, 150, 130, 0) 52%, rgba(90, 14, 8, .28) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 232, 224, .95), inset 0 -2px 6px rgba(255, 140, 118, .45), inset 0 0 0 1px rgba(255, 205, 192, .4),
    inset 0 -10px 16px -12px rgba(60, 8, 4, .35), 0 1px 1px rgba(60, 10, 6, .12), 0 16px 26px -14px rgba(176, 54, 42, .55) }
.glass.glass--dark, [data-tone="ink"] .glass.glass:not(.glass--red) { --g-tint: rgba(255, 255, 255, .12);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .08) 46%, rgba(255, 255, 255, 0) 52%, rgba(255, 255, 255, .06) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .75), inset 0 -1px 1px rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .3), 0 14px 26px -14px rgba(20, 20, 20, .4) }
.glass.glass:hover { filter: brightness(1.04) saturate(1.05) }
@media (prefers-reduced-transparency: reduce) { .glass.glass { background-image: none } }

/* ---------- v4: closer to macOS glass — clear, not frosted plastic ----------
   Almost no tint and little blur, so what lies behind stays visible; the form is drawn only by light: a hairline rim that
   catches the light top-left and again bottom-right, a soft glow just inside the edge, a lensing gradient at the rim and a
   shadow that is barely there. Chromium also refracts the backdrop at the edges (glass.js). */
.glass.glass:not(.glass--red) { --g-tint: rgba(255, 255, 255, .1); --g-blur: blur(2.5px) saturate(185%) brightness(1.04);
  background-image: radial-gradient(140% 120% at 50% 50%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, .26) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 40%);
  box-shadow: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, .95), inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, .7),
    inset 0 0 0 .5px rgba(255, 255, 255, .55), inset 0 0 8px rgba(255, 255, 255, .28), 0 0 0 .5px rgba(20, 20, 20, .08), 0 6px 18px -10px rgba(20, 20, 20, .28) }
.glass.glass--red { --g-blur: blur(2.5px) saturate(160%);
  background-image: radial-gradient(140% 120% at 50% 50%, rgba(255, 200, 188, 0) 58%, rgba(255, 200, 188, .3) 100%), linear-gradient(180deg, rgba(255, 210, 198, .3) 0%, rgba(255, 210, 198, 0) 42%);
  box-shadow: inset 1.5px 1.5px 1px -1px rgba(255, 236, 230, .95), inset -1.5px -1.5px 1px -1px rgba(255, 210, 200, .6),
    inset 0 0 0 .5px rgba(255, 215, 205, .5), inset 0 0 8px rgba(255, 200, 188, .3), 0 0 0 .5px rgba(80, 14, 8, .14), 0 8px 20px -10px rgba(176, 54, 42, .5) }
.glass.glass--dark, [data-tone="ink"] .glass.glass:not(.glass--red) { --g-tint: rgba(255, 255, 255, .06);
  background-image: radial-gradient(140% 120% at 50% 50%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, .16) 100%), linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 40%);
  box-shadow: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, .8), inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, .45), inset 0 0 0 .5px rgba(255, 255, 255, .35), inset 0 0 8px rgba(255, 255, 255, .14), 0 6px 18px -10px rgba(0, 0, 0, .4) }
.glass::before { opacity: .55 }
/* on the red closing field: the main action is milk glass with dark words, the second a smoked pane; no saturation boost on red */
.closing .glass.glass:not(.glass--red):not(.glass--dark) { --g-tint: rgba(244, 243, 239, .9); --g-fg: #141414; --g-blur: blur(6px) brightness(1.02) }
.closing .glass.glass.glass--dark { --g-tint: rgba(70, 12, 6, .24); --g-fg: #fff; --g-blur: blur(6px) }

/* ---------- v5: one edge, real transparency ----------
   The double relief came from stacking three edges (a gradient ring, inset hairlines, the refraction map). Now there is one:
   a single hairline that is brighter along the top, a soft sheen in the upper half, no inner glow, and no edge refraction.
   The pane itself is nearly clear; the blur only softens what lies behind so the words stay readable. */
.glass-refract .glass, .glass { -webkit-backdrop-filter: var(--g-blur) !important; backdrop-filter: var(--g-blur) !important }
.glass::before { content: none !important }
.glass.glass:not(.glass--red) { --g-tint: rgba(255, 255, 255, .16); --g-blur: blur(10px) saturate(160%);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .06) 55%, rgba(255, 255, 255, 0) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(20, 20, 20, .06), 0 8px 22px -12px rgba(20, 20, 20, .22) }
.glass.glass--red { --g-tint: rgba(194, 74, 62, .78); --g-fg: #fff; --g-blur: blur(10px) saturate(150%); text-shadow: none;
  background-image: linear-gradient(180deg, rgba(255, 226, 218, .3) 0%, rgba(255, 226, 218, .05) 55%, rgba(255, 226, 218, 0) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 222, 214, .38), inset 0 1px 0 rgba(255, 236, 230, .5), 0 1px 2px rgba(80, 14, 8, .1), 0 10px 24px -12px rgba(176, 54, 42, .45) }
.glass.glass--dark, [data-tone="ink"] .glass.glass:not(.glass--red) { --g-tint: rgba(255, 255, 255, .08);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, 0) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .32), 0 10px 24px -12px rgba(0, 0, 0, .4) }
.glass.glass:hover { filter: none } .glass:hover { background-color: color-mix(in srgb, var(--g-tint), #fff 8%) }
.glass--red:hover { background-color: color-mix(in srgb, var(--g-tint), #fff 6%) }

/* ---------- v6: the one action is a block of ink, not an app button ----------
   Solid printing red, no shadow, no sheen, no blur: a Swiss block. On the red studio it is printed in black instead. */
.glass.glass--red { --g-tint: #B33A2E; background-color: #B33A2E !important; background-image: none !important; box-shadow: none !important; text-shadow: none;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; color: #fff }
.glass.glass--red::after { display: none }
.glass.glass--red:hover { background-color: #9E3127 !important }
html[data-tone="ink"] .glass.glass--red, .process .glass.glass--red { --g-tint: #15100E; background-color: #15100E !important; color: #F6EBDD }
html[data-tone="ink"] .glass.glass--red:hover, .process .glass.glass--red:hover { background-color: #000 !important }
