/* A screen of the app shown as it is: the computer's window. */
@layer widgets {
  /* The visitor's computer, by data-os on <html>: Mac for Apple and while the system is unknown, Windows for Windows
     and Android, Linux for Linux. A window not shown is never loaded: its picture is lazy. */
  [data-desk]:not([data-desk="macos"]),
  :root:is([data-os="windows"], [data-os="android"], [data-os="androidtv"], [data-os="linux"]) [data-desk="macos"] {
    display: none;
  }
  :root:is([data-os="windows"], [data-os="android"], [data-os="androidtv"]) [data-desk="windows"],
  :root[data-os="linux"] [data-desk="linux"] {
    display: block;
  }
  .shot {
    width: min(100%, 1100px);
    margin: var(--space-16) auto 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--shadow-shot);
  }
  .shot img {
    width: 100%;
  }
  .shot + .pill {
    margin-top: var(--space-12);
  }

  /* A phone shows the window's left part larger, where its words read: the state, the line under it, the map
     with the route (SPEC-PAGES §0.19.8). */
  @media (max-width: 760px) {
    .shot img {
      width: 140%;
      max-width: none;
    }
  }
}
/* Questions: what to do without the code and where to read more beside them, the answers folded. */
@layer widgets {
  .faq-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-25);
  }
  .faq-aside {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: var(--space-3);
  }
  .faq-aside p {
    max-width: 28ch;
    margin: var(--space-6) 0 var(--space-1);
    font-size: var(--text-lg);
  }
  .faq-list details {
    border-bottom: 1px solid var(--color-line);
  }
  .faq-list summary {
    font-size: var(--text-xl);
    list-style: none;
    position: relative;
    padding-block: var(--space-6);
    padding-inline: 0 var(--space-9);
  }
  .faq-list summary::-webkit-details-marker {
    display: none;
  }
  .faq-list summary::after {
    content: "+";
    position: absolute;
    inset-inline-end: 0;
    top: 22px;
    font-size: var(--text-2xl);
  }
  .faq-list details[open] summary::after {
    content: "−";
  }
  .faq-list p {
    padding-block: 0 var(--space-7);
    padding-inline: 0 var(--space-6);
  }

  @media (max-width: 980px) {
    .faq-layout {
      gap: var(--space-14);
    }
  }

  @media (max-width: 760px) {
    .faq-layout {
      grid-template-columns: 1fr;
      gap: var(--space-11);
    }
  }
}
/* The main page's last screen, in the dark theme: a film edge to edge, its parts captioned on the left; the
   caption of the part on screen is lit. */
@layer widgets {
  .photo-band {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: min(92svh, 840px);
    overflow: hidden;
    background: var(--color-dark);
  }
  .photo-band > video {
    position: absolute;
    z-index: var(--z-media);
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% 50%;
  }
  .photo-band::after {
    content: "";
    position: absolute;
    z-index: var(--z-scrim);
    inset: 0;
    background: var(--scrim-band);
  }
  .photo-band .shell {
    padding-block: var(--space-24);
  }
  .film {
    min-height: min(84svh, 780px);
  }
  .film > video {
    object-position: 70% 50%;
  }
  .photo-band h2 {
    max-width: 20ch;
  }
  .photo-band p {
    color: var(--color-light-soft);
  }
  .photo-band .pill {
    margin-top: var(--space-8);
  }
  .film .notes {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 360px);
    gap: var(--space-7);
  }
  /* A part not on screen stays readable: the four stories are what the film says (SPEC-PAGES §0.19.8). */
  .film.playing .notes > div:not(.on) {
    opacity: 0.7;
  }

  @media (max-width: 760px) {
    .photo-band {
      min-height: 88svh;
    }
    .film {
      min-height: 78svh;
    }
    .film > video {
      object-position: var(--focus, 70%) 50%;
      transition: object-position var(--duration-slower) var(--ease);
    }
    .photo-band .shell {
      padding-block: var(--space-16);
    }
    .film .notes {
      grid-template-columns: 1fr;
    }
    .film.playing .notes > div {
      grid-area: 1 / 1;
    }
    .film.playing .notes > div:not(.on) {
      opacity: 0;
    }
  }
}
/* The main hero (SPEC-PAGES §0.21): the film of the doorway over its first frame, which shows until the film plays,
   with reduced motion and without scripts; the line under the buttons and the pause of the film. */
@layer widgets {
  /* The film and its first frame lie the same way: the doorway stands at 65% of the wide frame's width, in the
     middle of the tall one. */
  .portal-hero > video,
  .portal-hero .poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 65% 50%;
  }
  .portal-hero .poster img {
    z-index: var(--z-poster);
  }
  .portal-hero > video {
    z-index: var(--z-media);
  }
  .hero .foot {
    position: absolute;
    bottom: var(--space-7);
    inset-inline: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* The pause button's height from the start: the line does not jump when the button appears. */
    min-height: 44px;
    color: var(--color-light-faint);
    font-size: var(--text-sm);
    line-height: var(--leading-label);
  }
  .motion {
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
  }
  .motion svg {
    width: 12px;
    height: 12px;
  }
  .motion:hover {
    color: var(--color-light);
  }

  @media (max-width: 760px) {
    .portal-hero > video,
    .portal-hero .poster img {
      object-position: 50% 50%;
    }
  }

  @media (max-aspect-ratio: 1/1) {
    .hero .foot {
      bottom: max(var(--space-4), env(safe-area-inset-bottom));
    }
  }

  @media (max-width: 380px) {
    #hero .actions {
      gap: var(--space-2);
    }
    #hero .pill {
      padding: 0 var(--space-5);
    }
    #hero .pill svg {
      margin-inline-start: var(--space-4);
    }
    #hero .pill.outline {
      padding: 0 var(--space-4);
    }
  }

  @media (max-height: 680px) and (min-aspect-ratio: 1/1) {
    #hero {
      min-height: 560px;
    }
    #hero .copy {
      padding-block: var(--space-23);
    }
    #hero h1 {
      font-size: var(--display-lg-short);
    }
    #hero .foot {
      bottom: var(--space-3);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .motion {
      display: none;
    }
  }
}
/* The app: four facts around the app at work, like Plasma's "Spend. Send. Earn."; on a tablet and a phone two
   level rows under it. While the scene plays, the fact it shows is lit (model/scene.ts). */
@layer widgets {
  .product-stage {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-18);
    margin: var(--space-18) auto 0;
  }
  .benefits {
    display: grid;
    gap: var(--space-22);
  }
  .benefits p {
    max-width: 24ch;
    margin: var(--space-4) auto 0;
  }
  .benefits .stat {
    max-width: none;
    margin: 0;
    color: var(--color-text);
    font-size: var(--figure-md);
    font-weight: var(--weight-light);
    line-height: var(--leading-none);
    letter-spacing: var(--tracking-figure);
  }

  /* The app at work (SPEC-PAGES §0.15): the phone with "Internet works" holds the place until the film plays,
     then the scene takes it. The scene is drawn at one size (the lens), scaled by steps to its place and cut
     at its edges, so nothing of it widens the page; where things stand and how they move is model/scene.ts. */
  .at-work {
    display: grid;
    place-items: center;
  }
  .at-work > * {
    grid-area: 1 / 1;
  }
  .at-work-still {
    --w: 320px;

    transition: opacity var(--duration-slow) var(--ease);
  }
  .at-work-scene {
    --k: 1;
    --lens-w: 560px;
    --lens-h: 760px;

    position: relative;
    width: calc(var(--lens-w) * var(--k));
    height: calc(var(--lens-h) * var(--k));
    contain: strict;
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease);
  }
  .playing .at-work-scene {
    visibility: visible;
    opacity: 1;
  }
  /* The edges melt into the page: the page's own colour laid over them, not a mask over the moving scene (a mask
     would draw the whole scene apart in every frame). */
  .at-work-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--fade-scene);
  }
  .playing .at-work-still {
    opacity: 0;
  }
  .at-work-lens {
    --depth: 1400px;

    position: absolute;
    left: 50%;
    top: 50%;
    direction: ltr;
    width: var(--lens-w);
    height: var(--lens-h);
    translate: -50% -50%;
    scale: var(--k);
    perspective: var(--depth);
  }
  .at-work-space {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
  }
  .at-work-space > * {
    position: absolute;
    translate: -50% -50%;
  }
  .at-work-phone,
  .at-work-xray {
    --w: 320px;
  }
  /* The phone seen through: its drawing stays while it turns clear, the body, the screen's edge and the island
     (an Android phone's camera), as phone.css draws them (model/scene.ts gives it the phone's size). */
  .at-work-xray {
    border: 2px solid var(--color-text);
    border-radius: calc(var(--w) * 0.165);
    opacity: 0;
  }
  .at-work-xray::before,
  .at-work-xray::after {
    content: "";
    position: absolute;
    border: 1px solid var(--color-text);
  }
  .at-work-xray::before {
    inset: calc(var(--w) * 0.03 - 2px);
    border-radius: calc(var(--w) * 0.135);
  }
  .at-work-xray::after {
    left: 50%;
    top: calc(var(--w) * 0.052);
    width: calc(var(--w) * 0.275);
    height: calc(var(--w) * 0.08);
    translate: -50% 0;
    border-radius: var(--radius-pill);
  }
  .at-work-xray.android {
    border-radius: calc(var(--w) * 0.12);
  }
  .at-work-xray.android::before {
    border-radius: calc(var(--w) * 0.095);
  }
  .at-work-xray.android::after {
    width: calc(var(--w) * 0.04);
    height: calc(var(--w) * 0.04);
  }
  /* A finger on the screen: a shade where it touches, a ring when it lets go. */
  .at-work-touch,
  .at-work-ring {
    --size: 34px;

    position: absolute;
    width: var(--size);
    height: var(--size);
    translate: -50% -50%;
    border-radius: var(--radius-round);
    opacity: 0;
  }
  .at-work-touch {
    background: var(--color-text);
  }
  .at-work-ring {
    border: 2px solid var(--color-text);
  }
  /* Seen through the phone: the app's map under it, the exit far ahead, the app's eight ways from the phone's
     button to the exit as arcs fanned round the straight line between them, each in its own plane, with its name
     and its shade on the ground. They are tried one at a time: the network stops the first two on their way, and
     no answer comes; the third reaches the exit and the answer runs back red; that way stays red. Every one of them
     is a leaf of its world, placed by its own transform (model/scene.ts); only drawing the ways repaints. */
  .at-work-world {
    transform-style: preserve-3d;
  }
  .at-work-world > * {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    transform-origin: 0 0;
    opacity: 0;
  }
  /* The ground: the app's land as its dots (tools/world-map.mjs), darkest round the way, the page's colour laid
     over them further off and at the edges (a picture, not a mask: a mask is laid again in every frame). */
  .at-work-ground {
    background:
      var(--gradient-ground),
      url("/assets/ground.DuZ6MW54.svg") 0 0 / 100% 100%;
  }
  .at-work-shade {
    border-radius: var(--radius-round);
    background: var(--gradient-shade);
  }
  .at-work-shades svg {
    overflow: visible;
  }
  .at-work-shades path {
    fill: none;
    stroke: var(--color-text);
    stroke-width: 8;
    stroke-linecap: round;
    opacity: 0.12;
  }
  .at-work-arc svg {
    overflow: visible;
  }
  /* A way: faint before it is tried, ink as its probe draws it, red under the answer. Its pieces meet end to end,
     square, so that a faint line does not darken where they meet. */
  .at-work-arc path {
    fill: none;
    stroke: var(--color-text);
    stroke-width: 5;
    stroke-linecap: butt;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0.8;
  }
  .at-work-arc .at-work-faint {
    stroke-width: 4;
    opacity: 0.32;
  }
  .at-work-arc .at-work-red {
    stroke: var(--color-accent);
    stroke-width: 7;
    opacity: 1;
  }
  .at-work-arc .at-work-halo {
    stroke: var(--color-accent);
    stroke-width: 28;
    opacity: 0.18;
  }
  .at-work-here,
  .at-work-end {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-round);
    background: var(--gradient-you);
    box-shadow: var(--shadow-menu);
  }
  .at-work-end {
    width: 84px;
    height: 84px;
    background: var(--gradient-exit);
  }
  .at-work-end.at-work-reached {
    background: var(--gradient-reached);
  }
  .at-work-ripple {
    width: 84px;
    height: 84px;
    border: 3px solid var(--color-accent);
    border-radius: var(--radius-round);
  }
  /* What runs along a way is placed by its transform alone, in the colour of what runs (a probe ink, the answer
     red): a tail fading behind on the line, and a head turned to the camera with a soft halo. */
  .at-work-world .at-work-trail,
  .at-work-world .at-work-head {
    color: var(--color-text);
  }
  .at-work-world .at-work-trail {
    width: 200px;
    height: 7px;
    border-radius: var(--radius-pill);
    background: var(--gradient-trail);
  }
  .at-work-world .at-work-head {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-round);
    background: currentcolor;
    box-shadow: var(--glow-signal);
  }
  .at-work-world .at-work-answer {
    color: var(--color-accent);
  }
  .at-work-world .at-work-trail.at-work-answer {
    width: 280px;
    height: 10px;
  }
  .at-work-world .at-work-head.at-work-answer {
    width: 26px;
    height: 26px;
    box-shadow: var(--glow-signal-answer);
  }
  /* The names stand by their marks, turned to the camera, as the app's map labels them: the exit dark, the
     person light; each way's name where it bows furthest, light, and dark once it is the way chosen; where the
     network stopped a way, its mark, smaller and muted. */
  .at-work-label {
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-pill);
    background: var(--color-dark);
    color: var(--color-light);
    font-size: var(--heading-md);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-label);
    white-space: nowrap;
  }
  .at-work-world .at-work-you,
  .at-work-world .at-work-way,
  .at-work-world .at-work-silent {
    background: var(--color-white);
    color: var(--color-dark);
    box-shadow: var(--shadow-menu);
  }
  .at-work-world .at-work-you {
    font-size: var(--heading-sm);
  }
  .at-work-world .at-work-way {
    font-size: var(--heading-xs);
  }
  .at-work-world .at-work-silent {
    color: var(--color-text-muted);
    font-size: var(--heading-xs);
  }

  @media (max-width: 1180px) {
    .at-work-scene {
      --k: 0.82;
    }
  }

  @media (max-width: 980px) {
    .product-stage {
      grid-template-columns: 1fr 1fr;
      align-items: start;
      gap: var(--space-11) var(--space-9);
    }
    .at-work {
      grid-column: 1/-1;
      grid-row: 1;
      justify-self: center;
    }
    .benefits {
      display: contents;
    }
  }

  @media (max-width: 760px) {
    .product-stage {
      gap: var(--space-11) var(--space-5);
      margin-top: var(--space-12);
    }
    .at-work-still {
      --w: 260px;
    }
    .at-work-scene {
      --k: 0.62;
    }
    /* The scene is drawn smaller here: the ways' names a step larger in it. */
    .at-work-world .at-work-way {
      font-size: var(--heading-sm);
    }
    .benefits p {
      font-size: var(--text-md);
    }
  }

  @media (max-width: 380px) {
    .at-work-scene {
      --k: 0.56;
    }
  }

  @media (prefers-reduced-motion: reduce),(scripting: none) {
    .at-work-scene {
      display: none;
    }
  }
}
