/* The public pages: what anyone reads before signing in — the AI page, the
   privacy policy and the terms (owner, 2026-11-17, the "Chalet AI Connect"
   canvas). The app's paper and ink at a wider measure, the day divider's
   whisper heading each section, and one size the app does not have: a public
   page's headline. */
@layer components {
  .public__frame {
    max-inline-size: 72rem;
    margin-inline: auto;
    padding-inline: calc(var(--block-space) * 1.5);
  }

  .public__header {
    padding-block: calc(var(--block-space) * 1.25);
  }

  .public__brand {
    --icon-size: 1.5rem;

    text-decoration: none;
  }

  /* The room around the hero and between sections shrinks with the screen:
     at a desk's 6rem a phone saw the headline start a fifth of the way down. */
  .public__hero {
    max-inline-size: 46rem;
    padding-block: clamp(2.5rem, 10vw, 6rem) clamp(2.5rem, 8vw, 5rem);
  }

  .public__headline {
    margin-block: var(--block-space) calc(var(--block-space) * 1.75);
    font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  /* A section's first words, a step up from body: a sentence, where another
     page would set a heading. */
  .public__lead {
    max-inline-size: 40rem;
    margin-block: 0 var(--block-space-double);
    font-size: var(--text-medium);
    line-height: 1.5;
  }

  .public__ctas {
    margin-block-start: calc(var(--block-space) * 2.5);
  }

  /* The way in stands a finger tall, at a desk as on a phone. The row is an
     action row, so the second beside the filled one is framed. */
  .public__cta {
    --btn-padding: 0 calc(var(--inline-space) * 2.5);

    min-block-size: var(--tap-target-size);
  }

  .public__section {
    padding-block: var(--block-space-double) clamp(3rem, 10vw, 5rem);
  }

  .public__head {
    margin-block-end: var(--block-space-double);
  }

  /* What you might ask, as your own lines in a chat: the bubble of yours
     (messages.css), at the end side. */
  .public__asks {
    --bubble-max-inline-size: 34rem;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--block-space) * 0.75);
    max-inline-size: 46rem;
    margin-inline-start: auto;

    p {
      margin: 0;
    }
  }

  /* One app a row: its name beside its steps, stacked on a phone. */
  .public__steps > article {
    display: flex;
    flex-wrap: wrap;
    gap: var(--block-space) 3rem;
    padding-block: var(--block-space-double);
    border-block-start: var(--border);

    &:last-child {
      border-block-end: var(--border);
    }

    /* It grows, so that stacked on a phone its line runs the row's width. */
    > h3 {
      flex: 1 1 14rem;
      margin: 0;
      font-size: var(--text-medium);

      span {
        display: block;
        margin-block-start: var(--block-space-half);
        font-size: var(--text-small);
        font-weight: 400;
        color: var(--color-ink-subtle);
      }
    }

    > div {
      flex: 999 1 26rem;
      min-inline-size: 0;
    }

    ol {
      padding-inline-start: var(--inline-space-double);
    }
  }

  /* A name and its words, in as many columns as the width holds. */
  .public__points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: var(--block-space-double) 3rem;
    margin: 0;

    dd {
      margin: var(--block-space-half) 0 0;
    }
  }

  .public__points--stacked {
    grid-template-columns: 1fr;
  }

  .public__fine-print {
    max-inline-size: 44rem;
    margin-block-start: 3rem;
  }

  .public__agents {
    gap: 3rem 4rem;
  }

  /* A thread as a project page draws one: a face beside each entry. */
  .public__thread {
    display: flex;
    flex: 1 1 26rem;
    flex-direction: column;
    gap: calc(var(--block-space) * 1.5);
    min-inline-size: 0;
    max-inline-size: 34rem;
    margin: 0;
  }

  .public__mention {
    --mention-background: var(--color-selected);

    color: var(--color-selected-ink);
  }

  .public__agent-points {
    flex: 1 1 22rem;
    min-inline-size: 0;

    > p {
      margin-block: var(--block-space-double) 0;
    }
  }

  /* A page of reading — the privacy policy, the terms — keeps the prose
     measure, about 67 characters at 17px, and the app's own title, centred
     under the header. The header stays as wide as on every public page: one
     that changed width from page to page was worse (owner, 2026-11-17). */
  .public__prose {
    max-inline-size: 40rem;
    margin-inline: auto;
    padding-block: var(--block-space-double) clamp(3rem, 10vw, 5rem);

    h2 {
      margin-block: var(--block-space-double) var(--block-space-half);
      font-size: var(--text-medium);
    }

    p,
    ul {
      margin-block: 0 var(--block-space);
    }
  }

  .public__footer {
    padding-block: var(--block-space-double) 3rem;

    .icon--logo {
      --icon-size: 1.25rem;
    }
  }
}
