/* The static title and signature also work with scripts disabled. */
.about-title-mask,
.about-title-line { display: block; }
.about-signature .about-signature-text { display: inline-block; font: inherit; margin: 0; }
.about-grid-motion,
.about-note-fill,
.about-note-shadow,
.about-note-drag-shadow,
.about-fold-back,
.about-note-sheen,
.about-count-roll { display: none; }

.about-drag-ready { overflow-x: clip; }
.about-drag-ready .about-tabs { position: relative; }
.about-note-motion { position: relative; display: grid; min-width: 0; }
.about-stage-swing { display: grid; min-width: 0; }
.about-stage-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.about-stage-underline, .about-stage-mini-star, .about-stage-plane,
.about-stage-shade, .about-stage-pin-shine { display: none; }
.note-arrow > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.about-drag-ready .about-note { touch-action: none; }
.about-note-motion:has(.about-note-hover, :focus-visible) { z-index: 3; }
.about-note-motion:has(.is-paper-dragging) { z-index: 8; }
.about-note-motion:has(.is-paper-returning) { z-index: 7; }
.about-drag-ready .about-tabs:has(.is-paper-dragging, .is-paper-returning) { position: relative; z-index: 4; }
.about-drag-ready .is-paper-dragging { z-index: 8; cursor: grabbing; }
.about-drag-ready .is-paper-returning { z-index: 7; }
@media screen and (prefers-reduced-motion: reduce) {
  .about-drag-ready .is-paper-dragging {
    translate: var(--about-drag-x, 0px) var(--about-drag-y, 0px);
    box-shadow: 0 24px 44px 0 #162b3363;
  }
}

@property --about-peer-x { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --about-lift { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --about-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

@media screen and (prefers-reduced-motion: no-preference) {
  .about-motion-ready {
    --about-spring: cubic-bezier(.34,1.56,.64,1);
    --about-ease: cubic-bezier(.22,1,.36,1); /* Set from FormeMotion on mount. */
    --about-drop-time: 700ms;
    --about-drop-squash: .92;
    --about-pin-sink: 4px;
    --about-title-time: 680ms;
    --about-title-step: 110ms;
    --about-marker-time: 430ms;
    --about-marker-offset: .16em;
    --about-card-step: 90ms;
    --about-card-lead: 260ms;
    --about-card-rise: -44px;
    --about-pin-time: 220ms;
    --about-fold-time: 340ms;
    --about-fold-gap: 235ms;
    --about-pin-x: 27.5px;
    --about-pin-y: -1.5px;
    --about-fill-time: 560ms;
    --about-hover-time: 420ms;
    --about-hover-lift: -14px;
    --about-hover-fold: -68deg;
    --about-pin-hop: -8px;
    --about-arrow-pop: 6px;
    --about-signature-time: 720ms;
    --about-footer-lead: 1040ms;
    --about-grid-bleed: 6px;
    --about-note-shadow: 0 8px 16px #162b331f;
    --about-note-shadow-raised: 0 24px 44px 0 #162b3363;
    --about-note-shadow-drag: 0 32px 56px 0 #162b3363;
    background-image: none;
  }

  .about-grid-motion {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background-size: inherit;
  }
  .about-grid-motion::before {
    content: '';
    position: absolute;
    inset: calc(-1 * var(--about-grid-bleed));
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: inherit;
    background-position: var(--about-grid-bleed) var(--about-grid-bleed);
    transform: translate3d(var(--about-grid-x, 0px), var(--about-grid-y, 0px), 0);
  }

  .about-motion-ready [data-about-entry="waiting"] { opacity: 0; pointer-events: none; }
  .about-motion-ready[data-about-paused] * { animation-play-state: paused; }
  .about-motion-ready[data-about-paused] *::before,
  .about-motion-ready[data-about-paused] *::after { animation-play-state: paused; }
  .about-motion-ready [data-about-entry="playing"] { --about-entry-delay: 0ms; }
  .about-motion-ready .about-heading[data-about-entry="playing"] .about-title-mask {
    clip-path: inset(-.1em -.2em -.34em);
  }
  [data-about-entry="playing"] .about-title-line {
    animation: about-in-title var(--about-title-time) var(--about-spring) both;
  }
  [data-about-entry="playing"] .about-title-mask + .about-title-mask .about-title-line {
    animation-delay: var(--about-title-step);
  }
  .about-motion-ready h2 em::after { transform-origin: left center; translate: 0 var(--about-marker-offset); }
  .about-motion-ready [data-about-entry="playing"] em::after {
    animation: about-in-line var(--about-marker-time) var(--about-ease)
      calc(var(--about-title-time) + var(--about-title-step)) both;
  }
  .about-motion-ready :is(.about-intro, .about-notes-label, .about-panel-wrap)[data-about-entry="playing"] {
    animation: about-in-support 420ms var(--about-ease) var(--about-entry-delay) both;
  }
  .about-intro[data-about-entry="playing"] { --about-entry-delay: 260ms; }

  .about-motion-ready .about-note {
    --about-rest-y: 0px;
    --about-rest-angle: var(--note-rotation);
    --about-lift: var(--about-rest-y);
    --about-angle: var(--about-rest-angle);
    --about-arrow-y: var(--about-arrow-pop);
    --about-card-delay: calc(var(--about-card-lead) + var(--about-card-index, 0) * var(--about-card-step));
    isolation: isolate;
    background: #fffefa;
    box-shadow: var(--about-note-shadow);
    transform-origin: var(--about-pin-x) var(--about-pin-y);
    transform: translate3d(calc(var(--about-peer-x, 0px) + var(--about-drag-x, 0px)),
      calc(var(--about-lift) + var(--about-drag-y, 0px)), 0)
      rotate(calc(var(--about-angle) + var(--about-drag-angle, 0deg)))
      perspective(760px) rotateX(var(--about-tilt-x, 0deg)) rotateY(var(--about-tilt-y, 0deg));
    transition: --about-peer-x var(--about-hover-time) var(--about-spring),
      --about-lift var(--about-hover-time) var(--about-spring),
      --about-angle var(--about-hover-time) var(--about-spring);
  }
  .about-note-motion:nth-child(even) .about-note { --about-arrow-y: calc(-1 * var(--about-arrow-pop)); }
  .about-motion-ready .about-note[aria-selected="true"] {
    --about-rest-y: -9px;
    --about-rest-angle: -1deg;
  }
  @media (max-width: 767px) {
    .about-motion-ready { --about-card-lead: 100ms; --about-footer-lead: 140ms; }
    .about-motion-ready .about-tabs { padding-inline: 12px; column-gap: 18px; }
    .about-motion-ready .about-note[aria-selected="true"] { --about-rest-y: -5px; }
  }
  .about-motion-ready .about-note:is(.about-note-hover, :focus-visible) {
    --about-lift: var(--about-hover-lift);
    --about-angle: 0deg;
    z-index: 3;
  }
  .about-motion-ready .about-note.is-paper-dragging { --about-lift: -12px; z-index: 8; }
  .about-motion-ready .about-note.is-paper-returning { z-index: 7; }
  .about-note-fill, .about-note-shadow, .about-note-drag-shadow, .about-note-sheen {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
  }
  .about-note-fill {
    background: var(--note-color);
    clip-path: circle(0% at var(--about-pin-x) var(--about-pin-y));
    transition: clip-path var(--about-fill-time) var(--about-ease);
  }
  .about-note[aria-selected="true"] .about-note-fill { clip-path: circle(150% at var(--about-pin-x) var(--about-pin-y)); }
  .about-note-shadow {
    opacity: 0;
    box-shadow: var(--about-note-shadow-raised);
    transition: opacity var(--about-hover-time) var(--about-ease);
  }
  .about-note:is(.about-note-hover, :focus-visible) .about-note-shadow { opacity: 1; }
  .about-note-drag-shadow {
    opacity: 0;
    box-shadow: var(--about-note-shadow-drag);
    transition: opacity var(--about-hover-time) var(--about-ease);
  }
  .is-paper-dragging .about-note-shadow { opacity: 0; }
  .is-paper-dragging .about-note-drag-shadow { opacity: 1; }
  .about-note-sheen { overflow: hidden; opacity: var(--about-sheen-opacity, 0); }
  .about-note-sheen::after {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #ffffffb0, #ffffff30 48%, transparent 72%);
    transform: translate3d(calc(var(--about-sheen-x, 0px) - 100px), calc(var(--about-sheen-y, 0px) - 100px), 0);
  }
  .about-motion-ready .about-note::before { z-index: 2; }
  .about-motion-ready .about-note-hover::before {
    animation: about-hover-pin var(--about-hover-time) var(--about-spring);
  }
  .about-motion-ready .about-note::after {
    z-index: 2;
    transform-origin: top right;
    transition: transform var(--about-hover-time) var(--about-spring);
  }
  .about-motion-ready .about-note:is(.about-note-hover, :focus-visible)::after {
    transform: perspective(220px) rotateY(var(--about-hover-fold)) rotateX(12deg);
  }
  .about-fold-back {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    background: #98b787;
    border-radius: 0 18px 0 0;
    opacity: 0;
    transition: opacity var(--about-hover-time) var(--about-ease);
    pointer-events: none;
  }
  .about-note:is(.about-note-hover, :focus-visible) .about-fold-back { opacity: 1; }
  @media (max-width: 767px) { .about-fold-back { width: 20px; height: 20px; } }
  .about-paper-spark {
    position: absolute;
    top: var(--about-pin-y);
    left: var(--about-pin-x);
    width: 5px;
    height: 5px;
    z-index: 3;
    border-radius: 50%;
    background: #e8a551;
    pointer-events: none;
  }
  .about-paper-spark:nth-of-type(even) { background: #ff735c; }
  .about-tabs[data-stage-awake] .about-stage-swing {
    animation: about-stage-breathe var(--stage-breath-period, 3600ms) ease-in-out var(--stage-phase, 0ms) infinite;
  }
  .about-tabs[data-stage-mode] .about-note::before {
    animation: none;
    transform: translateY(var(--stage-pin-y, 0px));
  }
  .about-tabs[data-stage-mode] .about-note::after {
    transition: none;
    transform: perspective(220px) rotateY(calc(var(--stage-fold, 0deg) + var(--stage-hover-fold, 0deg))) rotateX(6deg);
  }
  .about-tabs[data-stage-mode] .about-note:is(.about-note-hover, :focus-visible) {
    --stage-hover-fold: var(--about-hover-fold);
  }
  .about-tabs[data-stage-mode] .about-fold-back { opacity: var(--stage-fold-back, 0); }
  .about-tabs[data-stage-mode] .about-note-hover .about-fold-back { opacity: 1; }
  .about-stage-shade {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    box-shadow: var(--about-note-shadow-raised);
    opacity: 0;
    pointer-events: none;
  }
  .about-stage-pin-shine {
    display: block;
    position: absolute;
    top: -7px;
    left: 22px;
    width: 11px;
    height: 11px;
    z-index: 3;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(var(--stage-pin-y, 0px));
  }
  .about-stage-pin-shine > span {
    position: absolute;
    inset: -2px 0;
    background: linear-gradient(110deg, transparent 25%, #fff9 48%, transparent 70%);
    opacity: 0;
  }
  .about-tabs[data-stage-awake] .about-stage-pin-shine > span {
    animation: about-stage-pin-shine var(--stage-shine-period, 5000ms) ease-in-out var(--stage-phase, 0ms) infinite;
  }
  .about-stage-icon { transform-origin: center; transform-box: fill-box; }
  .about-stage-needle { transform-origin: 20px 20px; }
  .about-stage-content .note-word { position: relative; }
  .about-stage-content .note-top .about-stage-underline {
    display: block;
    position: absolute;
    top: 100%;
    left: -3px;
    width: 108%;
    height: 10px;
    transform: none;
    stroke: #6c907b;
    stroke-width: 1.6;
  }
  .about-stage-mini-star, .about-stage-plane {
    display: block;
    position: absolute;
    z-index: 4;
    top: 19px;
    right: 22px;
    opacity: 0;
    pointer-events: none;
    stroke: #536d59;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
  }
  .about-stage-mini-star { width: 17px; height: 17px; fill: var(--star-color, #f4c85e); }
  .about-stage-plane { width: 38px; height: 34px; top: 0; right: 14px; fill: #f8f6d9; }
  .about-stage-plane-trail { fill: none; stroke-dasharray: 3 3; }
  :root[data-theme="dark"] .about-stage-underline { stroke: #b9c9aa; }
  @keyframes about-stage-breathe {
    0%, 100% { scale: 1; }
    50% { scale: var(--stage-breath-scale, 1.012); }
  }
  @keyframes about-stage-pin-shine {
    0%, 80% { opacity: 0; transform: translateX(-130%); }
    83% { opacity: .9; }
    93%, 100% { opacity: 0; transform: translateX(130%); }
  }
  .about-motion-ready .about-note[data-about-entry="playing"] {
    animation: about-in-note var(--about-drop-time) var(--about-ease) var(--about-card-delay) both,
      about-in-pin-press var(--about-pin-time) var(--about-spring) calc(var(--about-card-delay) + var(--about-drop-time));
  }
  .about-note[data-about-entry="playing"] .about-note-shadow {
    animation: about-in-shadow var(--about-drop-time) var(--about-ease) var(--about-card-delay) backwards;
  }
  .about-motion-ready .about-note[data-about-entry="playing"]::before {
    animation: about-in-pin var(--about-pin-time) var(--about-spring) calc(var(--about-card-delay) + var(--about-drop-time)) both;
  }
  .about-motion-ready .about-note[data-about-entry="playing"]::after {
    animation: about-in-fold var(--about-fold-time) var(--about-spring)
      calc(var(--about-card-delay) + var(--about-drop-time) + var(--about-fold-gap)) both;
  }
  .about-note-hover .note-arrow { animation: about-hover-arrow var(--about-hover-time) var(--about-spring); }
  .about-note-hover .note-top svg { animation: about-hover-icon var(--about-hover-time) var(--about-spring); }

  .about-count { display: inline-grid; font-variant-numeric: tabular-nums; }
  .about-count > span { grid-area: 1 / 1; }
  .about-count-roll { display: block; opacity: 0; text-align: right; }
  .is-counting .about-count-value { opacity: 0; }
  .is-counting .about-count-roll { opacity: 1; }

  .about-motion-ready .about-panel-wrap {
    position: relative;
    display: grid;
  }
  .about-motion-ready .about-panel { grid-area: 1 / 1; }
  .about-motion-ready .about-panel[hidden] { display: grid; visibility: hidden; pointer-events: none; }
  .about-motion-ready .about-panel-outgoing { position: absolute; inset: 0; pointer-events: none; }
  .about-motion-ready :is(.about-panel-wrap, .about-signoff) {
    position: relative;
    --about-rule-color: #52655333;
    border-top-color: transparent;
  }
  :root[data-theme="dark"] .about-motion-ready :is(.about-panel-wrap, .about-signoff) {
    --about-rule-color: #a5b8ac44;
    border-top-color: transparent;
  }
  .about-motion-ready :is(.about-panel-wrap, .about-signoff)::before {
    content: '';
    position: absolute;
    inset: -1px 0 auto;
    height: 1px;
    pointer-events: none;
    background: var(--about-rule-color);
    transform-origin: left center;
  }
  :is(.about-panel-wrap, .about-signoff)[data-about-entry="playing"]::before {
    animation: about-in-line 520ms var(--about-ease) both;
  }
  .about-signoff[data-about-entry="playing"]::before { animation-delay: var(--about-footer-lead); }
  .about-signoff[data-about-entry="playing"] > :is(span:first-child, a) {
    animation: about-in-support 420ms var(--about-ease) var(--about-footer-lead) both;
  }
  [data-about-entry="playing"] .about-signature-text {
    animation: about-in-signature var(--about-signature-time) var(--about-ease) calc(var(--about-footer-lead) + 150ms) both;
  }
  @keyframes about-in-title { from { translate: 0 105%; rotate: -4deg; opacity: 0; } to { translate: 0 0; rotate: 0deg; opacity: 1; } }
  @keyframes about-in-line { from { scale: 0 1; } to { scale: 1 1; } }
  @keyframes about-in-support { from { translate: 0 12px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
  @keyframes about-in-note {
    from { translate: 0 var(--about-card-rise); rotate: var(--about-drop-angle, -10deg); scale: 1.04; opacity: 0; }
    72% { translate: 0 0; rotate: 0deg; scale: 1.025 var(--about-drop-squash); opacity: 1; animation-timing-function: var(--about-spring); }
    88% { translate: 0 -2px; rotate: 0deg; scale: .993 1.035; opacity: 1; }
    to { translate: 0 0; rotate: 0deg; scale: 1; opacity: 1; }
  }
  @keyframes about-in-pin-press { 0%,100% { translate: 0 0; } 38% { translate: 0 var(--about-pin-sink); } }
  @keyframes about-hover-pin { 0%,100% { transform: none; } 34% { transform: translateY(var(--about-pin-hop)) scale(1.16); } 69% { transform: translateY(1px) scale(.96); } }
  @keyframes about-in-shadow { from { opacity: .94; scale: 1.08; } to { opacity: 0; scale: 1; } }
  @keyframes about-in-pin { from { transform: translateY(-16px) scale(1.35); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes about-in-fold { from { transform: perspective(220px) rotateY(-92deg); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes about-in-signature { from { clip-path: inset(-25% 100% -25% 0); } to { clip-path: inset(-25% -5% -25% 0); } }
  @keyframes about-hover-arrow { 48% { translate: var(--about-arrow-pop) var(--about-arrow-y); scale: 1.24; } }
  @keyframes about-hover-icon { 28% { rotate: -17deg; } 65% { rotate: 13deg; } }
}
