@layer pf.tokens, pf.reset, pf.base, pf.layout, pf.components, pf.widgets, pf.platform, pf.looks, pf.utilities;

/* tokens.css */
@layer pf.tokens {
  :root {
    color-scheme: light dark;
    --pf-color-canvas: #f7f8fa;
    --pf-color-surface: #ffffff;
    --pf-color-surface-raised: #ffffff;
    --pf-color-ink: #14212b;
    --pf-color-ink-muted: #53616c;
    --pf-color-border: #d9e0e6;
    --pf-color-primary: #126b55;
    --pf-color-primary-hover: #0d5846;
    --pf-color-on-primary: #ffffff;
    --pf-color-accent: #f0a54a;
    --pf-color-danger: #b42332;
    --pf-color-success: #176b45;
    --pf-color-warning: #8a4b00;
    --pf-color-info: #175f9b;
    --pf-color-focus: #126b55;
    --pf-shadow-sm: 0 1px 2px rgb(15 32 43 / 8%);
    --pf-shadow-md: 0 14px 38px rgb(15 32 43 / 10%);
    --pf-radius-sm: 0.5rem;
    --pf-radius-md: 0.85rem;
    --pf-radius-lg: 1.25rem;
    --pf-radius-pill: 999px;
    --pf-corner-shape: round;
    --pf-carousel-item: 20rem;
    --pf-space-1: 0.25rem;
    --pf-space-2: 0.5rem;
    --pf-space-3: 0.75rem;
    --pf-space-4: 1rem;
    --pf-space-5: 1.5rem;
    --pf-space-6: 2rem;
    --pf-space-7: 3rem;
    --pf-space-8: 4rem;
    --pf-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --pf-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --pf-text-xs: 0.78rem;
    --pf-text-sm: 0.9rem;
    --pf-text-md: 1rem;
    --pf-text-lg: 1.2rem;
    --pf-text-xl: clamp(1.6rem, 3vw, 2.4rem);
    --pf-text-display: clamp(2.5rem, 6vw, 5.5rem);
    --pf-leading-tight: 1.08;
    --pf-leading-normal: 1.6;
    --pf-content-width: 72rem;
    --pf-prose-width: 68ch;
    --pf-control-height: 2.8rem;
    --pf-transition-fast: 140ms ease;
    --pf-transition-normal: 220ms ease;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --pf-color-canvas: #101719;
      --pf-color-surface: #172123;
      --pf-color-surface-raised: #1d2a2c;
      --pf-color-ink: #eaf2ef;
      --pf-color-ink-muted: #afbfba;
      --pf-color-border: #354648;
      --pf-color-primary: #6fd0aa;
      --pf-color-primary-hover: #89e2bb;
      --pf-color-on-primary: #0d2920;
      --pf-color-accent: #ffc36d;
      --pf-color-danger: #ff8d98;
      --pf-color-success: #79d6a7;
      --pf-color-warning: #ffcb78;
      --pf-color-info: #8fc8ff;
      --pf-color-focus: #89e2bb;
      --pf-shadow-sm: 0 1px 2px rgb(0 0 0 / 25%);
      --pf-shadow-md: 0 14px 38px rgb(0 0 0 / 25%);
    }
  }

  :root[data-theme="light"] {
    color-scheme: light;
  }

  :root[data-theme="dark"] {
    color-scheme: dark;
    --pf-color-canvas: #101719;
    --pf-color-surface: #172123;
    --pf-color-surface-raised: #1d2a2c;
    --pf-color-ink: #eaf2ef;
    --pf-color-ink-muted: #afbfba;
    --pf-color-border: #354648;
    --pf-color-primary: #6fd0aa;
    --pf-color-primary-hover: #89e2bb;
    --pf-color-on-primary: #0d2920;
    --pf-color-accent: #ffc36d;
    --pf-color-danger: #ff8d98;
    --pf-color-success: #79d6a7;
    --pf-color-warning: #ffcb78;
    --pf-color-info: #8fc8ff;
    --pf-color-focus: #89e2bb;
    --pf-shadow-sm: 0 1px 2px rgb(0 0 0 / 25%);
    --pf-shadow-md: 0 14px 38px rgb(0 0 0 / 25%);
  }
}

/* widgets.css */
/*
 * Profullstack CSS: widgets layer.
 *
 * Composed interface pieces built from the same tokens: scrollers with
 * previous/next arrows, a TV (10-foot) input mode, icon buttons with counts,
 * menus, media rows, avatars, calendars, date and color pickers, switches,
 * segmented controls, tabs, toasts, breadcrumbs, pagination, steps, stats,
 * progress rings, ratings, drop zones, timelines and an inbox layout.
 *
 * Plain CSS. Anything that needs behaviour (paging a scroller, switching
 * tabs, choosing a date) is the app's job; the examples show a few lines of
 * script for each. Everything lives in the pf.widgets cascade layer, after
 * pf.components and before pf.platform, so app rules still win.
 */

/* Registered so the scroller edge fades can animate (scroll-driven). */
@property --pf-fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --pf-fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@layer pf.widgets {
  /* ------------------------------------------------------------------
   * Layout helper: justify a .cluster.
   * ------------------------------------------------------------------ */

  .cluster[data-justify="between"] { justify-content: space-between; }
  .cluster[data-justify="end"] { justify-content: flex-end; }
  .cluster[data-justify="center"] { justify-content: center; }

  /* ------------------------------------------------------------------
   * Scroller: any overflowing row (or column, data-axis="block").
   * Put focusable items inside and keyboard, D-pad and touch all work:
   * moving focus scrolls the item into view with room to spare.
   * Wrap it in .scroller-frame with two <button data-scroll="prev|next">
   * for visible arrows; the app pages the scroller when they are pressed.
   * ------------------------------------------------------------------ */

  .stack > :is(.segmented, .avatar-group, .rating, .ring, .swatches) { align-self: flex-start; }

  .scroller {
    display: flex;
    gap: var(--pf-space-4);
    list-style: none;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: var(--pf-space-3) var(--pf-space-1) var(--pf-space-4);
    scroll-padding-inline: var(--pf-scroller-inset, var(--pf-space-6));
    scroll-snap-type: x proximity;
    scrollbar-color: var(--pf-color-border) transparent;
    scrollbar-width: thin;
  }

  .scroller > * {
    flex: 0 0 var(--pf-scroller-item, 14rem);
    min-inline-size: 0;
    scroll-margin-inline: var(--pf-scroller-inset, var(--pf-space-6));
    scroll-snap-align: start;
  }

  .scroller[data-axis="block"] {
    flex-direction: column;
    max-block-size: var(--pf-scroller-height, 24rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: var(--pf-space-1) var(--pf-space-3);
    scroll-padding-block: var(--pf-space-4);
    scroll-snap-type: y proximity;
  }

  .scroller[data-axis="block"] > * {
    flex: 0 0 auto;
    scroll-margin-block: var(--pf-space-4);
  }

  .scroller:focus-visible { outline-offset: -3px; }

  /* Soft edges that show there is more to scroll, where scroll timelines exist. */
  @supports (animation-timeline: scroll()) {
    .scroller {
      animation: pf-scroller-fade linear both;
      animation-timeline: scroll(self inline);
      mask-image: linear-gradient(to right, transparent, #000 var(--pf-fade-start), #000 calc(100% - var(--pf-fade-end)), transparent);
    }

    .scroller[data-axis="block"] {
      animation-timeline: scroll(self block);
      mask-image: linear-gradient(to bottom, transparent, #000 var(--pf-fade-start), #000 calc(100% - var(--pf-fade-end)), transparent);
    }

    .scroller:dir(rtl):not([data-axis="block"]) {
      mask-image: linear-gradient(to left, transparent, #000 var(--pf-fade-start), #000 calc(100% - var(--pf-fade-end)), transparent);
    }
  }

  @keyframes pf-scroller-fade {
    0% { --pf-fade-start: 0px; --pf-fade-end: 3rem; }
    8%, 92% { --pf-fade-start: 3rem; --pf-fade-end: 3rem; }
    100% { --pf-fade-start: 3rem; --pf-fade-end: 0px; }
  }

  .scroller-frame {
    position: relative;
  }

  .scroller-frame > [data-scroll] {
    align-items: center;
    background: var(--pf-color-surface);
    block-size: 3rem;
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-pill);
    box-shadow: var(--pf-shadow-md);
    color: var(--pf-color-ink);
    display: inline-flex;
    font-size: 1.25rem;
    inline-size: 3rem;
    inset-block-start: 50%;
    justify-content: center;
    min-height: 0;
    padding: 0;
    position: absolute;
    transition: opacity var(--pf-transition-fast), border-color var(--pf-transition-fast), color var(--pf-transition-fast);
    translate: 0 -50%;
    z-index: 2;
  }

  .scroller-frame > [data-scroll]:hover {
    background: var(--pf-color-surface);
    border-color: var(--pf-color-primary);
    color: var(--pf-color-primary);
  }

  .scroller-frame > [data-scroll="prev"] { inset-inline-start: var(--pf-space-2); }
  .scroller-frame > [data-scroll="next"] { inset-inline-end: var(--pf-space-2); }

  .scroller-frame > [data-scroll]:disabled {
    opacity: 0;
    pointer-events: none;
  }

  .scroller-frame:has(> .scroller[data-axis="block"]) > [data-scroll] {
    inset-block-start: auto;
    inset-inline: 50% auto;
    translate: -50% 0;
  }

  .scroller-frame:has(> .scroller[data-axis="block"]) > [data-scroll="prev"] { inset-block-start: var(--pf-space-1); }
  .scroller-frame:has(> .scroller[data-axis="block"]) > [data-scroll="next"] { inset-block-end: var(--pf-space-1); }

  /* On mouse devices the arrows appear when the row is hovered or focused. */
  @media (hover: hover) and (pointer: fine) {
    .scroller-frame > [data-scroll]:not(:disabled) { opacity: 0; }

    .scroller-frame:is(:hover, :focus-within) > [data-scroll]:not(:disabled) { opacity: 1; }
  }

  /* ------------------------------------------------------------------
   * Tile: a focusable media card (poster, thumbnail, channel) for shelves
   * and grids. The first child is the art; it zooms and rings on focus.
   * data-shape="poster|square" (default landscape 16:9).
   * ------------------------------------------------------------------ */

  .tile {
    border-radius: var(--pf-radius-md);
    color: inherit;
    display: grid;
    gap: var(--pf-space-2);
    outline: none;
    text-decoration: none;
  }

  .tile > :first-child {
    aspect-ratio: 16 / 9;
    background: var(--pf-color-surface-raised);
    block-size: auto;
    border-radius: var(--pf-radius-md);
    box-shadow: var(--pf-shadow-sm);
    display: grid;
    inline-size: 100%;
    object-fit: cover;
    outline: 3px solid transparent;
    outline-offset: 3px;
    overflow: hidden;
    place-items: center;
    transition: scale var(--pf-transition-normal), box-shadow var(--pf-transition-normal), outline-color var(--pf-transition-fast);
  }

  .tile[data-shape="poster"] > :first-child { aspect-ratio: 2 / 3; }
  .tile[data-shape="square"] > :first-child { aspect-ratio: 1; }

  .tile > :not(:first-child) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tile:hover > :first-child {
    box-shadow: var(--pf-shadow-md);
    scale: 1.03;
  }

  .tile:focus-visible > :first-child {
    box-shadow: var(--pf-shadow-md);
    outline-color: var(--pf-color-focus);
    scale: 1.06;
  }

  .tile:focus-visible > :nth-child(2) { color: var(--pf-color-primary); }

  .tile progress {
    block-size: 0.3rem;
    border-radius: var(--pf-radius-pill);
    overflow: hidden;
  }

  /* ------------------------------------------------------------------
   * TV / 10-foot mode: <html data-input="tv">. Bigger type and targets,
   * an overscan-safe page inset, loud focus that also shows on older TV
   * browsers without :focus-visible, and always-visible scroller arrows.
   * TV browsers move focus with the remote's D-pad on their own.
   * ------------------------------------------------------------------ */

  :root[data-input="tv"] {
    --pf-control-height: 3.5rem;
    --pf-scroller-item: clamp(14rem, 18vw, 22rem);
    --pf-scroller-inset: 5vw;
    cursor: none;
  }

  :root[data-input="tv"] body {
    font-size: clamp(1.1rem, 1.25vw, 1.75rem);
    padding: max(3vh, env(safe-area-inset-top)) max(5vw, env(safe-area-inset-right)) max(3vh, env(safe-area-inset-bottom)) max(5vw, env(safe-area-inset-left));
  }

  :root[data-input="tv"] :focus {
    outline: 4px solid var(--pf-color-focus);
    outline-offset: 4px;
  }

  :root[data-input="tv"] .tile:focus { outline: none; }

  :root[data-input="tv"] .tile:focus > :first-child {
    box-shadow: 0 0 0 4px var(--pf-color-focus), 0 24px 60px rgb(0 0 0 / 45%);
    outline-color: transparent;
    scale: 1.08;
  }

  :root[data-input="tv"] .tile:focus > :nth-child(2) { color: var(--pf-color-primary); }

  :root[data-input="tv"] .scroller {
    padding-block: var(--pf-space-5) var(--pf-space-6);
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

  :root[data-input="tv"] .scroller-frame > [data-scroll]:not(:disabled) { opacity: 1; }

  /* The shelf whose row has focus is the one being read. */
  :root[data-input="tv"] section:has(.scroller :focus) > :is(h2, h3) {
    color: var(--pf-color-primary);
  }

  :root[data-input="tv"] section:has(.scroller):not(:has(:focus)) .tile > :first-child {
    opacity: 0.82;
  }

  /* ------------------------------------------------------------------
   * Icon button: a square <button> or link holding an SVG, with an
   * aria-label. data-count draws a count bubble (cart, inbox, bell);
   * keep the count in the label too ("Cart, 3 items").
   * ------------------------------------------------------------------ */

  .icon-button {
    background: transparent;
    block-size: var(--pf-control-height);
    border: 1px solid transparent;
    border-radius: var(--pf-radius-sm);
    color: var(--pf-color-ink);
    flex: none;
    inline-size: var(--pf-control-height);
    padding: 0;
    position: relative;
  }

  .icon-button:hover {
    background: color-mix(in srgb, var(--pf-color-ink) 8%, transparent);
    color: var(--pf-color-ink);
  }

  .icon-button[aria-expanded="true"],
  .icon-button:has(+ [popover]:popover-open) {
    background: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
    color: var(--pf-color-primary);
  }

  .icon-button > svg {
    block-size: 1.35rem;
    inline-size: 1.35rem;
  }

  .icon-button[data-count]::after {
    align-items: center;
    background: var(--pf-color-danger);
    block-size: 1.25rem;
    border: 2px solid var(--pf-color-canvas);
    border-radius: var(--pf-radius-pill);
    box-sizing: content-box;
    color: #fff;
    content: attr(data-count);
    display: inline-flex;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    inset-block-start: -0.2rem;
    inset-inline-end: -0.2rem;
    justify-content: center;
    line-height: 1;
    min-inline-size: 0.85rem;
    padding-inline: 0.2rem;
    position: absolute;
  }

  .icon-button[data-count="0"]::after,
  .icon-button[data-count=""]::after { display: none; }

  /* ------------------------------------------------------------------
   * Menu: a list of actions or links, usually inside a [popover] or
   * <dialog>. <hr> separates groups; <kbd> pushes to the end of a row.
   * ------------------------------------------------------------------ */

  .menu {
    display: grid;
    gap: 2px;
    list-style: none;
    margin: 0;
    min-inline-size: 13rem;
    padding: 0;
  }

  .menu > li > :is(a, button),
  .menu > li > label {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--pf-radius-sm);
    color: var(--pf-color-ink);
    display: flex;
    font-weight: 520;
    gap: var(--pf-space-3);
    inline-size: 100%;
    justify-content: flex-start;
    margin: 0;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    text-align: start;
    text-decoration: none;
  }

  .menu > li > :is(a, button):is(:hover, :focus-visible),
  .menu > li > label:hover {
    background: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
    color: var(--pf-color-ink);
  }

  .menu > li > [aria-current]:not([aria-current="false"]) {
    background: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
    color: var(--pf-color-primary);
    font-weight: 650;
  }

  .menu > li > [data-variant="danger"] { color: var(--pf-color-danger); }

  .menu > li > [data-variant="danger"]:hover {
    background: color-mix(in srgb, var(--pf-color-danger) 12%, transparent);
    color: var(--pf-color-danger);
  }

  .menu svg {
    block-size: 1.1rem;
    flex: none;
    inline-size: 1.1rem;
    opacity: 0.8;
  }

  .menu :is(kbd, .badge) {
    font-size: var(--pf-text-xs);
    margin-inline-start: auto;
  }

  .menu > hr,
  .menu > li[role="separator"] {
    border: 0;
    border-top: 1px solid var(--pf-color-border);
    margin: var(--pf-space-1) 0;
  }

  .menu > li > :is(h2, h3, h4, small) {
    color: var(--pf-color-ink-muted);
    display: block;
    font-size: var(--pf-text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: var(--pf-space-2) 0.75rem var(--pf-space-1);
    text-transform: uppercase;
  }

  :where([popover]:has(> .menu)) { padding: var(--pf-space-1); }

  /* ------------------------------------------------------------------
   * Media row: art + body + aside, the shape of cart lines, messages,
   * notifications and search results. data-truncate keeps body lines to
   * one line each.
   * ------------------------------------------------------------------ */

  .media {
    align-items: center;
    color: inherit;
    display: grid;
    gap: var(--pf-space-3);
    grid-template-columns: auto minmax(0, 1fr) auto;
    text-decoration: none;
  }

  .media > :nth-child(2) {
    display: grid;
    gap: 0.1rem;
    min-inline-size: 0;
  }

  .media > :nth-child(3) {
    color: var(--pf-color-ink-muted);
    font-size: var(--pf-text-sm);
    text-align: end;
    white-space: nowrap;
  }

  .media[data-truncate] > :nth-child(2) > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .thumb {
    aspect-ratio: 1;
    background: var(--pf-color-surface-raised);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-sm);
    display: grid;
    font-size: 1.5rem;
    inline-size: 3.25rem;
    object-fit: cover;
    overflow: hidden;
    place-items: center;
  }

  /* ------------------------------------------------------------------
   * Avatar: an <img> or initials in a <span>. data-size="sm|lg".
   * .avatar-group overlaps a row of them.
   * ------------------------------------------------------------------ */

  .avatar {
    --pf-avatar: 2.5rem;
    align-items: center;
    background: color-mix(in srgb, var(--pf-color-primary) 18%, var(--pf-color-surface));
    block-size: var(--pf-avatar);
    border-radius: 50%;
    color: var(--pf-color-primary);
    display: inline-flex;
    flex: none;
    font-size: calc(var(--pf-avatar) * 0.38);
    font-weight: 720;
    inline-size: var(--pf-avatar);
    justify-content: center;
    letter-spacing: 0;
    object-fit: cover;
    overflow: hidden;
    user-select: none;
  }

  .avatar[data-size="sm"] { --pf-avatar: 1.75rem; }
  .avatar[data-size="lg"] { --pf-avatar: 3.75rem; }

  .avatar-group { display: flex; }

  .avatar-group > .avatar {
    border: 2px solid var(--pf-color-surface);
    box-sizing: content-box;
  }

  .avatar-group > .avatar + .avatar { margin-inline-start: calc(var(--pf-avatar) * -0.3); }

  /* ------------------------------------------------------------------
   * Calendar: a <table class="calendar"> month grid.
   * Picker cells hold a <button>; aria-current="date" marks today,
   * aria-pressed="true" the chosen day(s), data-in-range the days
   * between, data-outside the neighbouring months.
   * data-view="month" makes a full calendar display whose cells hold a
   * <time> and .event chips.
   * ------------------------------------------------------------------ */

  .calendar {
    border-collapse: separate;
    border-spacing: 0 2px;
    font-variant-numeric: tabular-nums;
    min-inline-size: 16rem;
    table-layout: fixed;
  }

  .calendar caption {
    color: var(--pf-color-ink);
    font-size: var(--pf-text-md);
    font-weight: 680;
    padding: 0 0 var(--pf-space-2);
  }

  .calendar abbr { text-decoration: none; }

  .calendar th {
    background: none;
    border: 0;
    color: var(--pf-color-ink-muted);
    font-size: var(--pf-text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: var(--pf-space-1) 0;
    text-align: center;
    text-transform: uppercase;
  }

  .calendar td {
    border: 0;
    padding: 0;
    text-align: center;
    vertical-align: top;
  }

  .calendar td > :is(button, a):not(.event) {
    aspect-ratio: 1;
    background: transparent;
    border: 0;
    border-radius: var(--pf-radius-sm);
    color: var(--pf-color-ink);
    font-weight: 520;
    inline-size: 100%;
    max-block-size: 2.75rem;
    min-height: 0;
    padding: 0;
    text-decoration: none;
  }

  .calendar td > :is(button, a):not(.event):hover {
    background: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
    color: var(--pf-color-ink);
  }

  .calendar td[data-outside] > * { color: var(--pf-color-ink-muted); opacity: 0.55; }

  .calendar :is(button, a, time)[aria-current="date"] {
    box-shadow: inset 0 0 0 2px var(--pf-color-primary);
    color: var(--pf-color-primary);
    font-weight: 760;
  }

  .calendar td[data-in-range] > :is(button, a) {
    background: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
    border-radius: 0;
  }

  .calendar td > :is(button, a):not(.event)[aria-pressed="true"],
  .calendar td > :is(button, a):not(.event)[aria-selected="true"] {
    background: var(--pf-color-primary);
    box-shadow: none;
    color: var(--pf-color-on-primary);
    font-weight: 700;
  }

  .calendar td > :is(button, a):not(.event):disabled,
  .calendar td > :not(.event)[aria-disabled="true"] {
    background: transparent;
    opacity: 0.35;
    text-decoration: line-through;
  }

  .calendar[data-view="month"] {
    border-collapse: collapse;
    border-spacing: 0;
    min-inline-size: 0;
  }

  .calendar[data-view="month"] td {
    block-size: clamp(5rem, 11vw, 7.5rem);
    border: 1px solid var(--pf-color-border);
    padding: var(--pf-space-1);
    text-align: start;
  }

  .calendar[data-view="month"] td > time {
    block-size: 1.9rem;
    border-radius: var(--pf-radius-pill);
    display: inline-grid;
    font-size: var(--pf-text-sm);
    font-weight: 620;
    inline-size: 1.9rem;
    margin-block-end: 0.15rem;
    place-items: center;
  }

  .calendar[data-view="month"] td > time[aria-current="date"] {
    background: var(--pf-color-primary);
    box-shadow: none;
    color: var(--pf-color-on-primary);
  }

  .calendar[data-view="month"] td:is(:first-child, :last-child) {
    background: color-mix(in srgb, var(--pf-color-ink) 3%, transparent);
  }

  .event {
    --pf-tone: var(--pf-color-primary);
    background: color-mix(in srgb, var(--pf-tone) 15%, transparent);
    border-inline-start: 3px solid var(--pf-tone);
    border-radius: 0.3rem;
    color: var(--pf-color-ink);
    display: block;
    font-size: var(--pf-text-xs);
    font-weight: 600;
    line-height: 1.35;
    margin-block-start: 2px;
    overflow: hidden;
    padding: 0.12rem 0.4rem;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  a.event:hover {
    background: color-mix(in srgb, var(--pf-tone) 26%, transparent);
    color: var(--pf-color-ink);
  }

  :is(.event, .timeline > li)[data-tone="success"] { --pf-tone: var(--pf-color-success); }
  :is(.event, .timeline > li)[data-tone="warning"] { --pf-tone: var(--pf-color-warning); }
  :is(.event, .timeline > li)[data-tone="danger"] { --pf-tone: var(--pf-color-danger); }
  :is(.event, .timeline > li)[data-tone="info"] { --pf-tone: var(--pf-color-info); }
  :is(.event, .timeline > li)[data-tone="accent"] { --pf-tone: var(--pf-color-accent); }

  /* Small screens: events collapse to coloured dots, still named for screen readers. */
  @media (max-width: 40rem) {
    .calendar[data-view="month"] .event {
      background: var(--pf-tone);
      block-size: 0.5rem;
      border: 0;
      border-radius: 50%;
      display: inline-block;
      font-size: 0;
      inline-size: 0.5rem;
      margin-inline-end: 2px;
      padding: 0;
    }
  }

  /* ------------------------------------------------------------------
   * Date and time inputs, field groups (joined controls, ranges, add-ons,
   * quantity steppers).
   * ------------------------------------------------------------------ */

  :where(input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"])) {
    font-variant-numeric: tabular-nums;
  }

  :where(input)::-webkit-calendar-picker-indicator {
    border-radius: 0.3rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0.2rem;
  }

  :where(input)::-webkit-calendar-picker-indicator:hover {
    background-color: color-mix(in srgb, var(--pf-color-primary) 14%, transparent);
    opacity: 1;
  }

  .field-group {
    align-items: stretch;
    display: flex;
  }

  .field-group > * {
    border-radius: 0;
    margin: 0;
  }

  .field-group > :first-child {
    border-end-start-radius: var(--pf-radius-sm);
    border-start-start-radius: var(--pf-radius-sm);
  }

  .field-group > :last-child {
    border-end-end-radius: var(--pf-radius-sm);
    border-start-end-radius: var(--pf-radius-sm);
  }

  .field-group > :not(:first-child) { margin-inline-start: -1px; }

  .field-group > :is(input, select) {
    flex: 1 1 0;
    min-inline-size: 0;
  }

  .field-group > input[type="number"] {
    flex: 0 0 4.5rem;
    text-align: center;
  }

  .field-group > :focus-visible {
    position: relative;
    z-index: 1;
  }

  .field-group > :is(span, output) {
    align-items: center;
    background: var(--pf-color-surface-raised);
    border: 1px solid var(--pf-color-border);
    color: var(--pf-color-ink-muted);
    display: inline-flex;
    font-size: var(--pf-text-sm);
    padding-inline: 0.8rem;
    white-space: nowrap;
  }

  .field-group > button:not([data-variant]) {
    background: var(--pf-color-surface);
    border-color: var(--pf-color-border);
    color: var(--pf-color-ink);
    min-inline-size: var(--pf-control-height);
    padding-inline: 0.75rem;
  }

  .field-group > button:not([data-variant]):hover {
    background: var(--pf-color-surface-raised);
    color: var(--pf-color-primary);
  }

  /* ------------------------------------------------------------------
   * Color: a native <input type="color"> as a swatch button, and
   * .swatches: a radio group of preset colours, each radio carrying
   * style="--swatch: #hex" and an aria-label. Selection is native.
   * ------------------------------------------------------------------ */

  :where(input[type="color"]) {
    appearance: none;
    background: var(--pf-color-surface);
    block-size: var(--pf-control-height);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-sm);
    cursor: pointer;
    inline-size: calc(var(--pf-control-height) * 1.4);
    padding: 0.3rem;
  }

  :where(input[type="color"])::-webkit-color-swatch-wrapper { padding: 0; }

  :where(input[type="color"])::-webkit-color-swatch {
    border: 0;
    border-radius: calc(var(--pf-radius-sm) - 0.2rem);
  }

  :where(input[type="color"])::-moz-color-swatch {
    border: 0;
    border-radius: calc(var(--pf-radius-sm) - 0.2rem);
  }

  .swatches {
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--pf-space-2);
    margin: 0;
    padding: 0;
  }

  .swatches input[type="radio"] {
    appearance: none;
    background: var(--swatch, currentColor);
    block-size: 2.25rem;
    border: 2px solid color-mix(in srgb, var(--pf-color-ink) 14%, transparent);
    border-radius: 50%;
    cursor: pointer;
    inline-size: 2.25rem;
    margin: 0;
    outline: 3px solid transparent;
    outline-offset: 3px;
    transition: scale var(--pf-transition-fast), outline-color var(--pf-transition-fast);
  }

  .swatches input[type="radio"]:hover { scale: 1.1; }

  .swatches input[type="radio"]:checked {
    border-color: var(--pf-color-surface);
    outline-color: var(--swatch, var(--pf-color-primary));
  }

  .swatches input[type="radio"]:focus-visible { outline-color: var(--pf-color-focus); }

  /* ------------------------------------------------------------------
   * Switch: <input type="checkbox" role="switch">.
   * ------------------------------------------------------------------ */

  :where(input[type="checkbox"][role="switch"]) {
    appearance: none;
    background: color-mix(in srgb, var(--pf-color-ink) 22%, transparent);
    block-size: 1.6rem;
    border-radius: var(--pf-radius-pill);
    cursor: pointer;
    flex: none;
    inline-size: 2.8rem;
    margin: 0 0.55rem 0 0;
    position: relative;
    transition: background-color var(--pf-transition-fast);
    vertical-align: middle;
  }

  :where(input[type="checkbox"][role="switch"])::before {
    background: #fff;
    block-size: 1.2rem;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
    content: "";
    inline-size: 1.2rem;
    inset-block-start: 0.2rem;
    inset-inline-start: 0.2rem;
    position: absolute;
    transition: translate var(--pf-transition-fast);
  }

  :where(input[type="checkbox"][role="switch"]:checked) { background: var(--pf-color-primary); }
  :where(input[type="checkbox"][role="switch"]:checked)::before { translate: 1.2rem 0; }
  :where(input[type="checkbox"][role="switch"]:checked:dir(rtl))::before { translate: -1.2rem 0; }
  :where(input[type="checkbox"][role="switch"]:disabled) { opacity: 0.5; }

  :where(label:has(> input[role="switch"])) {
    align-items: center;
    display: flex;
    font-weight: 520;
    margin: 0;
  }

  /* ------------------------------------------------------------------
   * Segmented control: a radio group whose labels wrap their radios.
   * <div class="segmented" role="radiogroup" aria-label="View">.
   * ------------------------------------------------------------------ */

  .segmented {
    background: var(--pf-color-surface-raised);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-md);
    display: inline-flex;
    gap: 0.2rem;
    margin: 0;
    max-inline-size: 100%;
    overflow-x: auto;
    padding: 0.2rem;
    scrollbar-width: none;
  }

  .segmented > label {
    align-items: center;
    border-radius: var(--pf-radius-sm);
    color: var(--pf-color-ink-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: var(--pf-text-sm);
    font-weight: 620;
    gap: var(--pf-space-2);
    margin: 0;
    padding: 0.45rem 0.9rem;
    position: relative;
    transition: background-color var(--pf-transition-fast), color var(--pf-transition-fast);
    white-space: nowrap;
  }

  .segmented > label:hover { color: var(--pf-color-ink); }

  .segmented > label > input {
    appearance: none;
    block-size: 100%;
    cursor: pointer;
    inline-size: 100%;
    inset: 0;
    margin: 0;
    position: absolute;
  }

  .segmented > label:has(> input:checked) {
    background: var(--pf-color-surface);
    box-shadow: var(--pf-shadow-sm);
    color: var(--pf-color-ink);
  }

  .segmented > label:has(> input:focus-visible) {
    outline: 3px solid var(--pf-color-focus);
    outline-offset: 1px;
  }

  .segmented > label > input:focus-visible { outline: none; }

  /* ------------------------------------------------------------------
   * Tabs: role="tablist" > button role="tab" aria-selected aria-controls,
   * panels role="tabpanel". The app switches aria-selected and hidden.
   * ------------------------------------------------------------------ */

  [role="tablist"] {
    border-bottom: 1px solid var(--pf-color-border);
    display: flex;
    gap: var(--pf-space-1);
    overflow-x: auto;
    scrollbar-width: none;
  }

  [role="tab"] {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: var(--pf-radius-sm) var(--pf-radius-sm) 0 0;
    color: var(--pf-color-ink-muted);
    font-weight: 620;
    margin-bottom: -1px;
    padding: 0.6rem 1rem;
    white-space: nowrap;
  }

  [role="tab"]:hover {
    background: color-mix(in srgb, var(--pf-color-ink) 5%, transparent);
    color: var(--pf-color-ink);
  }

  [role="tab"][aria-selected="true"] {
    border-bottom-color: var(--pf-color-primary);
    color: var(--pf-color-primary);
  }

  [role="tabpanel"] { padding-block: var(--pf-space-4); }

  /* ------------------------------------------------------------------
   * Toasts: a fixed live region (role="status") of .alert children.
   * ------------------------------------------------------------------ */

  .toasts {
    display: grid;
    gap: var(--pf-space-2);
    inline-size: min(24rem, calc(100vw - 2rem));
    inset-block-end: var(--pf-space-4);
    inset-inline-end: var(--pf-space-4);
    list-style: none;
    margin: 0;
    padding: 0;
    pointer-events: none;
    position: fixed;
    z-index: 50;
  }

  .toasts > * {
    animation: pf-toast-in 260ms ease both;
    box-shadow: var(--pf-shadow-md);
    pointer-events: auto;
  }

  @keyframes pf-toast-in {
    from { opacity: 0; translate: 0 0.75rem; }
  }

  /* ------------------------------------------------------------------
   * Breadcrumbs, pagination, steps.
   * ------------------------------------------------------------------ */

  .breadcrumbs :is(ol, ul) {
    display: flex;
    flex-wrap: wrap;
    font-size: var(--pf-text-sm);
    gap: var(--pf-space-2);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .breadcrumbs li + li::before {
    color: var(--pf-color-ink-muted);
    content: "/" / "";
    margin-inline-end: var(--pf-space-2);
  }

  .breadcrumbs [aria-current="page"] {
    color: var(--pf-color-ink);
    font-weight: 620;
    text-decoration: none;
  }

  .pagination :is(ol, ul) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .pagination li > :is(a, span) {
    align-items: center;
    background: var(--pf-color-surface);
    block-size: 2.5rem;
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-sm);
    color: var(--pf-color-ink);
    display: inline-flex;
    font-variant-numeric: tabular-nums;
    justify-content: center;
    min-inline-size: 2.5rem;
    padding: 0 0.65rem;
    text-decoration: none;
  }

  .pagination li > span {
    background: transparent;
    border-color: transparent;
    color: var(--pf-color-ink-muted);
  }

  .pagination li > a:hover {
    border-color: var(--pf-color-primary);
    color: var(--pf-color-primary);
  }

  .pagination li > a[aria-current="page"] {
    background: var(--pf-color-primary);
    border-color: var(--pf-color-primary);
    color: var(--pf-color-on-primary);
    font-weight: 700;
  }

  .pagination li > a[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
  }

  .steps {
    counter-reset: pf-step;
    display: flex;
    gap: var(--pf-space-3);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .steps > li {
    border-top: 4px solid var(--pf-color-border);
    color: var(--pf-color-ink-muted);
    counter-increment: pf-step;
    display: grid;
    flex: 1;
    font-size: var(--pf-text-sm);
    font-weight: 620;
    gap: 0.15rem;
    padding-top: var(--pf-space-2);
  }

  .steps > li::before {
    content: "Step " counter(pf-step);
    font-size: var(--pf-text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .steps > li[data-state="done"] {
    border-top-color: color-mix(in srgb, var(--pf-color-primary) 55%, transparent);
    color: var(--pf-color-ink);
  }

  .steps > li[aria-current="step"] {
    border-top-color: var(--pf-color-primary);
    color: var(--pf-color-primary);
  }

  /* ------------------------------------------------------------------
   * Skeleton, stat, progress ring, rating, drop zone, timeline.
   * ------------------------------------------------------------------ */

  .skeleton {
    animation: pf-shimmer 1.4s linear infinite;
    background: linear-gradient(90deg,
      color-mix(in srgb, var(--pf-color-ink) 7%, transparent) 0%,
      color-mix(in srgb, var(--pf-color-ink) 14%, transparent) 50%,
      color-mix(in srgb, var(--pf-color-ink) 7%, transparent) 100%) 0 0 / 200% 100%;
    border-radius: var(--pf-radius-sm);
    color: transparent;
    display: block;
    min-block-size: 1em;
    user-select: none;
  }

  @keyframes pf-shimmer {
    to { background-position: -200% 0; }
  }

  .stat {
    display: grid;
    gap: 0.2rem;
  }

  .stat > :first-child {
    color: var(--pf-color-ink-muted);
    font-size: var(--pf-text-sm);
    font-weight: 620;
  }

  .stat > strong {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-variant-numeric: tabular-nums;
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1.05;
  }

  [data-trend] { font-size: var(--pf-text-sm); font-weight: 650; }
  [data-trend="up"] { color: var(--pf-color-success); }
  [data-trend="down"] { color: var(--pf-color-danger); }
  [data-trend="up"]::before { content: "▲ " / ""; }
  [data-trend="down"]::before { content: "▼ " / ""; }

  .ring {
    --pf-tone: var(--pf-color-primary);
    --pf-ring: 5rem;
    --value: 0;
    align-items: center;
    background:
      radial-gradient(closest-side, var(--pf-color-surface) 79%, transparent 80% 100%),
      conic-gradient(var(--pf-tone) calc(var(--value) * 1%), color-mix(in srgb, var(--pf-color-ink) 10%, transparent) 0);
    block-size: var(--pf-ring);
    border-radius: 50%;
    display: inline-flex;
    flex: none;
    font-size: calc(var(--pf-ring) * 0.24);
    font-variant-numeric: tabular-nums;
    font-weight: 720;
    inline-size: var(--pf-ring);
    justify-content: center;
  }

  .ring[data-size="sm"] { --pf-ring: 3rem; }
  .ring[data-size="lg"] { --pf-ring: 8rem; }
  .ring[data-tone="success"] { --pf-tone: var(--pf-color-success); }
  .ring[data-tone="warning"] { --pf-tone: var(--pf-color-warning); }
  .ring[data-tone="danger"] { --pf-tone: var(--pf-color-danger); }

  /* Stars: radios in reverse order (5 down to 1) inside .rating; native selection. */
  .rating {
    border: 0;
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.15rem;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
  }

  .rating input {
    appearance: none;
    background: color-mix(in srgb, var(--pf-color-ink) 22%, transparent);
    block-size: 1.9rem;
    cursor: pointer;
    inline-size: 1.9rem;
    margin: 0;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: background-color var(--pf-transition-fast), scale var(--pf-transition-fast);
  }

  .rating input:checked,
  .rating input:checked ~ input { background: var(--pf-color-accent); }

  @media (hover: hover) {
    .rating:hover input:not(:hover):not(:hover ~ input) { background: color-mix(in srgb, var(--pf-color-ink) 22%, transparent); }

    .rating input:hover,
    .rating input:hover ~ input { background: var(--pf-color-accent); }

    .rating input:hover { scale: 1.12; }
  }

  .rating input:focus-visible {
    background: var(--pf-color-focus);
    outline: none;
  }

  /* A <label class="dropzone"> around <input type="file">: click or drop. */
  .dropzone {
    align-content: center;
    background: var(--pf-color-surface);
    border: 2px dashed var(--pf-color-border);
    border-radius: var(--pf-radius-md);
    color: var(--pf-color-ink-muted);
    cursor: pointer;
    display: grid;
    font-weight: 520;
    gap: var(--pf-space-2);
    justify-items: center;
    margin: 0;
    min-block-size: 10rem;
    padding: var(--pf-space-6);
    position: relative;
    text-align: center;
    transition: border-color var(--pf-transition-fast), background-color var(--pf-transition-fast);
  }

  .dropzone:hover,
  .dropzone:focus-within {
    background: color-mix(in srgb, var(--pf-color-primary) 6%, var(--pf-color-surface));
    border-color: var(--pf-color-primary);
    color: var(--pf-color-ink);
  }

  .dropzone:has(input:focus-visible) {
    outline: 3px solid var(--pf-color-focus);
    outline-offset: 3px;
  }

  .dropzone > input[type="file"] {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
  }

  .dropzone svg {
    block-size: 2rem;
    color: var(--pf-color-primary);
    inline-size: 2rem;
  }

  .timeline {
    border-inline-start: 2px solid var(--pf-color-border);
    display: grid;
    gap: var(--pf-space-4);
    list-style: none;
    margin: 0 0 0 0.5rem;
    padding: 0;
  }

  .timeline > li {
    --pf-tone: var(--pf-color-primary);
    display: grid;
    gap: 0.1rem;
    padding-inline-start: var(--pf-space-5);
    position: relative;
  }

  .timeline > li::before {
    background: var(--pf-color-surface);
    block-size: 1rem;
    border: 3px solid var(--pf-tone);
    border-radius: 50%;
    content: "";
    inline-size: 1rem;
    inset-block-start: 0.3rem;
    inset-inline-start: calc(-0.5rem - 1px);
    position: absolute;
  }

  .timeline time {
    color: var(--pf-color-ink-muted);
    font-size: var(--pf-text-xs);
    font-weight: 650;
  }

  /* ------------------------------------------------------------------
   * Inbox: three panes, nav, message list, reading pane. Each pane
   * scrolls on its own; narrow screens stack them.
   * <div class="inbox"><nav>…</nav><section>…</section><article>…</article></div>
   * ------------------------------------------------------------------ */

  .inbox {
    background: var(--pf-color-surface);
    block-size: var(--pf-inbox-height, min(80vh, 46rem));
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-lg);
    display: grid;
    grid-template-columns: minmax(11rem, 14rem) minmax(16rem, 24rem) minmax(0, 1fr);
    overflow: hidden;
  }

  .inbox > * {
    min-block-size: 0;
    min-inline-size: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .inbox > * + * { border-inline-start: 1px solid var(--pf-color-border); }

  .inbox > nav {
    background: color-mix(in srgb, var(--pf-color-ink) 2.5%, var(--pf-color-surface));
    padding: var(--pf-space-3);
  }

  .inbox > :is(section, article) > header {
    background: var(--pf-color-surface);
    border-bottom: 1px solid var(--pf-color-border);
    inset-block-start: 0;
    padding: var(--pf-space-3) var(--pf-space-4);
    position: sticky;
    z-index: 1;
  }

  .inbox > section > :is(ul, ol) {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .inbox > section .media {
    align-items: start;
    border-bottom: 1px solid var(--pf-color-border);
    padding: var(--pf-space-3) var(--pf-space-4) var(--pf-space-3) var(--pf-space-5);
    transition: background-color var(--pf-transition-fast);
  }

  .inbox > section .media:hover { background-color: color-mix(in srgb, var(--pf-color-ink) 4%, transparent); }

  .inbox > section .media:focus-visible { outline-offset: -3px; }

  .inbox > section .media[aria-current="true"] {
    background-color: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
    box-shadow: inset 3px 0 0 var(--pf-color-primary);
  }

  .inbox > section .media[data-unread] {
    background-image: radial-gradient(circle at 0.7rem 1.35rem, var(--pf-color-primary) 0.24rem, transparent 0.27rem);
  }

  .inbox > section .media[data-unread] > :nth-child(2) > :first-child { font-weight: 760; }

  .inbox > section .media[data-unread] > :nth-child(3) {
    color: var(--pf-color-primary);
    font-weight: 650;
  }

  .inbox > article {
    display: flex;
    flex-direction: column;
    gap: var(--pf-space-5);
  }

  .inbox > article > :not(header) { padding-inline: clamp(1rem, 3vw, 2rem); }
  .inbox > article > :last-child { padding-block-end: var(--pf-space-6); }

  @media (max-width: 64rem) {
    .inbox {
      grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
      grid-template-rows: auto minmax(0, 1fr);
    }

    .inbox > nav {
      border-bottom: 1px solid var(--pf-color-border);
      grid-column: 1 / -1;
      overflow-x: auto;
      padding: var(--pf-space-2);
    }

    .inbox > nav .menu { display: flex; min-inline-size: 0; }
    .inbox > nav .menu > li > * { white-space: nowrap; }
    .inbox > nav .menu > li > :is(h2, h3, h4, small),
    .inbox > nav .menu > hr { display: none; }
    .inbox > nav + * { border-inline-start: 0; }
  }

  @media (max-width: 44rem) {
    .inbox {
      block-size: auto;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: none;
    }

    .inbox > * + * {
      border-inline-start: 0;
      border-top: 1px solid var(--pf-color-border);
    }

    .inbox > section { max-block-size: 60vh; }
  }
}

/* platform.css */
/*
 * Profullstack CSS: platform layer.
 *
 * The newest native CSS, applied to the same semantic markup and the same
 * small vocabulary. Every rule is progressive enhancement: a browser that
 * lacks a feature keeps the 0.1 baseline from profullstack.css, and nothing
 * here hides content or depends on JavaScript.
 *
 * Everything lives in the pf.platform cascade layer, after pf.components and
 * before pf.utilities, so any unlayered app rule still wins.
 */

@layer pf.platform {
  /* ------------------------------------------------------------------
   * Page-level
   * ------------------------------------------------------------------ */

  :root {
    /* Lets transitions run to and from height: auto (details, disclosures). */
    interpolate-size: allow-keywords;
  }

  html {
    /* No layout jump when a dialog locks scrolling or content grows past the fold. */
    scrollbar-gutter: stable;
    scrollbar-color: var(--pf-color-border) transparent;
  }

  /* Scroll lock while a modal dialog is open, no script needed. */
  :where(html:has(dialog[open]:modal)) {
    overflow: hidden;
  }

  /* Cross-document view transitions: same-origin page loads cross-fade. */
  @media (prefers-reduced-motion: no-preference) {
    @view-transition {
      navigation: auto;
    }
  }

  /* Hanging quotes and tighter CJK punctuation in long text. */
  :where(.prose, blockquote) {
    hanging-punctuation: first allow-end last;
    text-spacing-trim: trim-start;
  }

  /* ------------------------------------------------------------------
   * Corners: one token reshapes every surface.
   * --pf-corner-shape: round (default) | squircle | bevel | scoop | notch
   * ------------------------------------------------------------------ */

  :where(.card, .surface, .alert, .badge, .carousel > *,
    button, .button, input, select, textarea, fieldset,
    dialog, [popover]) {
    corner-shape: var(--pf-corner-shape, round);
  }

  /* ------------------------------------------------------------------
   * Optical text alignment: trim the line box to cap height so labels sit
   * dead-centre in buttons and badges.
   * ------------------------------------------------------------------ */

  @supports (text-box: trim-both cap alphabetic) {
    :where(button, input[type="submit"], input[type="button"], input[type="reset"], .button) {
      text-box: trim-both cap alphabetic;
    }

    .badge {
      padding-block: 0.4rem;
      text-box: trim-both cap alphabetic;
    }
  }

  /* ------------------------------------------------------------------
   * Forms
   * ------------------------------------------------------------------ */

  /* Errors appear after the person has interacted, not on page load. */
  :where(input:user-invalid, select:user-invalid, textarea:user-invalid) {
    border-color: var(--pf-color-danger);
  }

  /* Textareas without an explicit rows attribute grow with their content. */
  @supports (field-sizing: content) {
    :where(textarea:not([rows])) {
      field-sizing: content;
      max-block-size: 24rem;
      min-block-size: 8rem;
    }
  }

  /* Customizable <select>: a themed picker instead of the OS popup. */
  @supports (appearance: base-select) {
    :where(select:not([multiple]):not([size])),
    :where(select:not([multiple]):not([size]))::picker(select) {
      appearance: base-select;
    }

    :where(select:not([multiple]):not([size])) {
      align-items: center;
      display: flex;
      gap: var(--pf-space-2);
      justify-content: space-between;
    }

    :where(select:not([multiple]):not([size]))::picker-icon {
      color: var(--pf-color-ink-muted);
      transition: rotate var(--pf-transition-fast);
    }

    :where(select:not([multiple]):not([size])):open::picker-icon {
      rotate: 180deg;
    }

    :where(select:not([multiple]):not([size]))::picker(select) {
      background: var(--pf-color-surface);
      border: 1px solid var(--pf-color-border);
      border-radius: var(--pf-radius-sm);
      box-shadow: var(--pf-shadow-md);
      color: var(--pf-color-ink);
      margin-block: var(--pf-space-1);
      padding: var(--pf-space-1);
      corner-shape: var(--pf-corner-shape, round);
    }

    :where(select:not([multiple]):not([size])) option {
      border-radius: calc(var(--pf-radius-sm) - var(--pf-space-1));
      gap: var(--pf-space-2);
      padding: 0.55rem 0.7rem;
    }

    :where(select:not([multiple]):not([size])) option:is(:hover, :focus-visible) {
      background: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
    }

    :where(select:not([multiple]):not([size])) option:checked {
      font-weight: 650;
    }

    :where(select:not([multiple]):not([size])) option::checkmark {
      color: var(--pf-color-primary);
    }
  }

  /* ------------------------------------------------------------------
   * Disclosures: native <details> opens and closes with a height animation.
   * ------------------------------------------------------------------ */

  @supports selector(::details-content) {
    :where(details)::details-content {
      block-size: 0;
      overflow-y: clip;
      transition:
        block-size var(--pf-transition-normal),
        content-visibility var(--pf-transition-normal) allow-discrete;
    }

    :where(details[open])::details-content {
      block-size: auto;
    }
  }

  /* ------------------------------------------------------------------
   * Dialogs and popovers: entry and exit animation with @starting-style,
   * light surfaces for [popover], and anchoring to the invoking button.
   * ------------------------------------------------------------------ */

  :where(dialog, [popover]) {
    opacity: 0;
    scale: 0.97;
    transition:
      opacity var(--pf-transition-normal),
      scale var(--pf-transition-normal),
      overlay var(--pf-transition-normal) allow-discrete,
      display var(--pf-transition-normal) allow-discrete;
  }

  :where(dialog[open], [popover]:popover-open) {
    opacity: 1;
    scale: 1;
  }

  @starting-style {
    :where(dialog[open], [popover]:popover-open) {
      opacity: 0;
      scale: 0.97;
    }
  }

  :where(dialog)::backdrop {
    background: rgb(7 18 19 / 0%);
    transition:
      background-color var(--pf-transition-normal),
      overlay var(--pf-transition-normal) allow-discrete,
      display var(--pf-transition-normal) allow-discrete;
  }

  :where(dialog[open])::backdrop {
    background: rgb(7 18 19 / 62%);
  }

  @starting-style {
    :where(dialog[open])::backdrop {
      background: rgb(7 18 19 / 0%);
    }
  }

  :where([popover]) {
    background: var(--pf-color-surface);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-md);
    box-shadow: var(--pf-shadow-md);
    color: var(--pf-color-ink);
    max-inline-size: min(24rem, calc(100vw - 2rem));
    padding: var(--pf-space-4);
  }

  :where([popover="hint"]) {
    font-size: var(--pf-text-sm);
    padding: var(--pf-space-2) var(--pf-space-3);
  }

  /*
   * data-anchor on a popover opened by popovertarget (or commandfor) places
   * it next to the button that opened it, flipping when space runs out.
   * Without anchor positioning it stays a centred popover.
   */
  @supports (position-area: block-end) {
    :where([popover][data-anchor]) {
      inset: auto;
      margin: var(--pf-space-2) 0;
      position-area: block-end span-inline-end;
      position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    }

    :where([popover][data-anchor="top"]) {
      position-area: block-start span-inline-end;
    }

    :where([popover][data-anchor="end"]) {
      margin: 0 var(--pf-space-2);
      position-area: inline-end center;
    }
  }

  /* ------------------------------------------------------------------
   * Carousel: a scroll-snap row everywhere; native scroll buttons and
   * markers where ::scroll-button and ::scroll-marker exist. No script.
   * ------------------------------------------------------------------ */

  .carousel {
    display: grid;
    gap: var(--pf-space-4);
    grid-auto-columns: min(85%, var(--pf-carousel-item, 20rem));
    grid-auto-flow: column;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: var(--pf-space-1) 0 var(--pf-space-3);
    scroll-padding-inline: var(--pf-space-1);
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .carousel > * {
    scroll-snap-align: start;
  }

  @supports selector(::scroll-marker) {
    .carousel {
      anchor-name: --pf-carousel;
      anchor-scope: --pf-carousel;
      scroll-marker-group: after;
      scrollbar-width: none;
    }

    .carousel::scroll-marker-group {
      display: flex;
      gap: var(--pf-space-2);
      justify-content: center;
      padding-block: var(--pf-space-2);
    }

    .carousel > *::scroll-marker {
      background: var(--pf-color-border);
      border-radius: var(--pf-radius-pill);
      block-size: 0.55rem;
      content: "";
      inline-size: 0.55rem;
      transition: inline-size var(--pf-transition-fast), background-color var(--pf-transition-fast);
    }

    .carousel > *::scroll-marker:target-current {
      background: var(--pf-color-primary);
      inline-size: 1.6rem;
    }

    .carousel::scroll-button(*) {
      align-items: center;
      background: var(--pf-color-surface);
      block-size: 2.5rem;
      border: 1px solid var(--pf-color-border);
      border-radius: var(--pf-radius-pill);
      box-shadow: var(--pf-shadow-sm);
      color: var(--pf-color-ink);
      cursor: pointer;
      display: inline-flex;
      inline-size: 2.5rem;
      justify-content: center;
      position: absolute;
      position-anchor: --pf-carousel;
      position-area: center;
      z-index: 1;
    }

    .carousel::scroll-button(*):disabled {
      cursor: default;
      opacity: 0;
    }

    .carousel::scroll-button(*):not(:disabled):hover {
      border-color: var(--pf-color-primary);
      color: var(--pf-color-primary);
    }

    .carousel::scroll-button(inline-start) {
      content: "←" / "Previous";
      justify-self: start;
      margin-inline-start: var(--pf-space-2);
    }

    .carousel::scroll-button(inline-end) {
      content: "→" / "Next";
      justify-self: end;
      margin-inline-end: var(--pf-space-2);
    }
  }

  /* ------------------------------------------------------------------
   * Gap decorations: data-rules draws lines in the gaps of a .grid or
   * .cluster, with no borders or pseudo-elements on the children.
   * ------------------------------------------------------------------ */

  @supports (row-rule: 1px solid) {
    :where(.grid, .cluster)[data-rules] {
      column-rule: 1px solid var(--pf-color-border);
      row-rule: 1px solid var(--pf-color-border);
    }
  }

  /* ------------------------------------------------------------------
   * Scroll reveal: children of [data-reveal] fade up as they scroll into
   * view, staggered by sibling-index(). Content that is already on screen
   * or in a browser without scroll timelines is simply visible.
   * ------------------------------------------------------------------ */

  @keyframes pf-reveal {
    from {
      opacity: 0;
      translate: 0 1.25rem;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
      :where([data-reveal]) > * {
        animation: pf-reveal linear both;
        animation-range: entry 0% entry 70%;
        animation-timeline: view();
      }
    }

    @supports (animation-timeline: view()) and (inline-size: calc(sibling-index() * 1px)) {
      :where([data-reveal]) > * {
        animation-range-start: entry calc(min(sibling-index() - 1, 6) * 6%);
      }
    }
  }
}


@layer pf.reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    min-width: 320px;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  figure,
  blockquote,
  dl,
  dd {
    margin: 0;
  }

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    padding: 0;
  }

  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    max-width: 100%;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  button,
  [role="button"] {
    cursor: pointer;
  }

  button:disabled,
  [aria-disabled="true"] {
    cursor: not-allowed;
  }

  textarea:not([rows]) {
    min-height: 8rem;
  }

  [hidden] {
    display: none !important;
  }
}

@layer pf.base {
  :where(body) {
    background: var(--pf-color-canvas);
    color: var(--pf-color-ink);
    font-family: var(--pf-font-sans);
    font-size: clamp(0.96rem, 0.92rem + 0.16vw, var(--pf-text-md));
    line-height: var(--pf-leading-normal);
    min-height: 100vh;
    accent-color: var(--pf-color-primary);
    transition: background-color var(--pf-transition-normal), color var(--pf-transition-normal);
  }

  :where(h1, h2, h3, h4, h5, h6) {
    color: var(--pf-color-ink);
    font-weight: 680;
    letter-spacing: -0.035em;
    line-height: var(--pf-leading-tight);
    text-wrap: balance;
  }

  :where(h1) { font-size: var(--pf-text-display); }
  :where(h2) { font-size: var(--pf-text-xl); }
  :where(h3) { font-size: clamp(1.15rem, 1.08rem + 0.4vw, 1.45rem); }
  :where(h4, h5, h6) { font-size: 1rem; }

  :where(p, li, dd) {
    text-wrap: pretty;
  }

  :where(a) {
    color: var(--pf-color-primary);
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
  }

  :where(a:hover) {
    color: var(--pf-color-primary-hover);
    text-decoration-color: currentColor;
  }

  :where(code, kbd, samp, pre) {
    font-family: var(--pf-font-mono);
    font-size: 0.92em;
  }

  :where(code, kbd) {
    background: var(--pf-color-surface-raised);
    border: 1px solid var(--pf-color-border);
    border-radius: 0.35rem;
    padding: 0.12em 0.35em;
  }

  :where(pre) {
    background: var(--pf-color-surface-raised);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-md);
    color: var(--pf-color-ink);
    max-width: 100%;
    overflow: auto;
    padding: var(--pf-space-5);
    tab-size: 2;
  }

  :where(pre code) {
    background: none;
    border: 0;
    padding: 0;
  }

  :where(hr) {
    border: 0;
    border-top: 1px solid var(--pf-color-border);
    margin-block: var(--pf-space-6);
  }

  :where(small, .muted) {
    color: var(--pf-color-ink-muted);
  }

  :where(figure > figcaption) {
    color: var(--pf-color-ink-muted);
    font-size: var(--pf-text-sm);
    margin-top: var(--pf-space-2);
  }

  :where(blockquote) {
    border-inline-start: 3px solid var(--pf-color-primary);
    color: var(--pf-color-ink-muted);
    padding-inline-start: var(--pf-space-5);
  }

  :where(:focus-visible) {
    outline: 3px solid var(--pf-color-focus);
    outline-offset: 3px;
  }

  :where(::selection) {
    background: color-mix(in srgb, var(--pf-color-primary) 28%, transparent);
  }

  :where(:target) {
    scroll-margin-block: 5rem;
  }
}

@layer pf.layout {
  .container {
    margin-inline: auto;
    max-width: var(--pf-content-width);
    padding-inline: clamp(1rem, 4vw, 2rem);
    width: 100%;
  }

  .prose {
    max-width: var(--pf-prose-width);
  }

  .stack {
    display: flex;
    flex-direction: column;
    gap: var(--pf-space-4);
  }

  .stack[data-space="sm"] { gap: var(--pf-space-2); }
  .stack[data-space="lg"] { gap: var(--pf-space-6); }

  .cluster {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--pf-space-3) var(--pf-space-4);
  }

  .grid {
    display: grid;
    gap: var(--pf-space-5);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  }

  .grid[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid[data-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .split {
    align-items: center;
    display: grid;
    gap: clamp(2rem, 6vw, 5rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding-block: clamp(3rem, 8vw, 7rem);
  }

  @media (max-width: 48rem) {
    .grid[data-columns="2"],
    .grid[data-columns="3"],
    .grid[data-columns="4"],
    .split {
      grid-template-columns: minmax(0, 1fr);
    }
  }
}

@layer pf.components {
  :where(button, input, select, textarea, fieldset) {
    border-radius: var(--pf-radius-sm);
  }

  :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) {
    background: var(--pf-color-surface);
    border: 1px solid var(--pf-color-border);
    color: var(--pf-color-ink);
    min-height: var(--pf-control-height);
    padding: 0.65rem 0.8rem;
    width: 100%;
  }

  :where(textarea) {
    min-height: 8rem;
    resize: vertical;
  }

  :where(input::placeholder, textarea::placeholder) {
    color: var(--pf-color-ink-muted);
    opacity: 0.8;
  }

  :where(input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"]) {
    border-color: var(--pf-color-danger);
  }

  :where(label) {
    color: var(--pf-color-ink);
    display: block;
    font-weight: 580;
    margin-bottom: var(--pf-space-2);
  }

  :where(fieldset) {
    border: 1px solid var(--pf-color-border);
    margin: 0;
    padding: var(--pf-space-4);
  }

  :where(legend) {
    font-weight: 650;
    padding-inline: var(--pf-space-2);
  }

  :where(input[type="checkbox"], input[type="radio"]) {
    height: 1.1rem;
    margin-inline-end: 0.4rem;
    vertical-align: -0.15em;
    width: 1.1rem;
  }

  :where(input[type="range"]) { accent-color: var(--pf-color-primary); }

  :where(button, input[type="submit"], input[type="button"], input[type="reset"], .button) {
    align-items: center;
    background: var(--pf-color-primary);
    border: 1px solid transparent;
    border-radius: var(--pf-radius-sm);
    color: var(--pf-color-on-primary);
    display: inline-flex;
    font-weight: 650;
    gap: var(--pf-space-2);
    justify-content: center;
    min-height: var(--pf-control-height);
    padding: 0.65rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: background-color var(--pf-transition-fast), border-color var(--pf-transition-fast), color var(--pf-transition-fast), transform var(--pf-transition-fast);
  }

  :where(button:hover, input[type="submit"]:hover, input[type="button"]:hover, .button:hover) {
    background: var(--pf-color-primary-hover);
    color: var(--pf-color-on-primary);
  }

  :where(button:active, .button:active) { transform: translateY(1px); }

  :where(button[data-variant="secondary"], .button[data-variant="secondary"]) {
    background: var(--pf-color-surface);
    border-color: var(--pf-color-border);
    color: var(--pf-color-ink);
  }

  :where(button[data-variant="secondary"]:hover, .button[data-variant="secondary"]:hover) {
    background: var(--pf-color-surface-raised);
    color: var(--pf-color-ink);
  }

  :where(button[data-variant="ghost"], .button[data-variant="ghost"]) {
    background: transparent;
    color: var(--pf-color-primary);
  }

  :where(button[data-variant="danger"], .button[data-variant="danger"]) {
    background: var(--pf-color-danger);
    color: var(--pf-color-surface);
  }

  :where(button:disabled, button[aria-disabled="true"], .button[aria-disabled="true"]) {
    opacity: 0.56;
    transform: none;
  }

  :where(table) {
    border-collapse: collapse;
    width: 100%;
  }

  :where(caption) {
    color: var(--pf-color-ink-muted);
    font-size: var(--pf-text-sm);
    padding: 0.6rem;
    text-align: start;
  }

  :where(th, td) {
    border-bottom: 1px solid var(--pf-color-border);
    padding: 0.75rem 0.9rem;
    text-align: start;
    vertical-align: top;
  }

  :where(th) {
    font-size: var(--pf-text-sm);
    font-weight: 680;
  }

  :where(thead th) { background: var(--pf-color-surface-raised); }

  :where(details) {
    border-bottom: 1px solid var(--pf-color-border);
    padding-block: var(--pf-space-3);
  }

  :where(summary) {
    cursor: pointer;
    font-weight: 620;
  }

  :where(details[open] summary) { margin-bottom: var(--pf-space-3); }

  :where(progress, meter) {
    accent-color: var(--pf-color-primary);
    width: 100%;
  }

  :where(dialog) {
    background: var(--pf-color-surface);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-lg);
    box-shadow: var(--pf-shadow-md);
    color: var(--pf-color-ink);
    max-height: min(90vh, 50rem);
    max-width: min(40rem, calc(100vw - 2rem));
    padding: clamp(1.25rem, 4vw, 2rem);
  }

  :where(dialog::backdrop) { background: rgb(7 18 19 / 62%); }

  :where(mark) {
    background: color-mix(in srgb, var(--pf-color-accent) 42%, transparent);
    color: inherit;
    padding-inline: 0.16em;
  }

  .card {
    background: var(--pf-color-surface);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-md);
    box-shadow: var(--pf-shadow-sm);
    padding: clamp(1rem, 2vw, 1.5rem);
  }

  .alert {
    background: var(--pf-color-surface);
    border: 1px solid var(--pf-color-border);
    border-inline-start: 4px solid var(--pf-color-info);
    border-radius: var(--pf-radius-sm);
    padding: var(--pf-space-4);
  }

  .alert[data-tone="success"] { border-inline-start-color: var(--pf-color-success); }
  .alert[data-tone="warning"] { border-inline-start-color: var(--pf-color-warning); }
  .alert[data-tone="danger"] { border-inline-start-color: var(--pf-color-danger); }

  .badge {
    align-items: center;
    background: var(--pf-color-surface-raised);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-pill);
    color: var(--pf-color-ink-muted);
    display: inline-flex;
    font-size: var(--pf-text-xs);
    font-weight: 680;
    gap: var(--pf-space-1);
    line-height: 1.4;
    padding: 0.25rem 0.6rem;
  }

  .stack > .badge { align-self: flex-start; }

  .badge[data-tone="success"] { color: var(--pf-color-success); }
  .badge[data-tone="warning"] { color: var(--pf-color-warning); }
  .badge[data-tone="danger"] { color: var(--pf-color-danger); }
}

@layer pf.utilities {
  .muted { color: var(--pf-color-ink-muted); }
  .eyebrow {
    color: var(--pf-color-primary);
    font-size: var(--pf-text-xs);
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .surface {
    background: var(--pf-color-surface);
    border: 1px solid var(--pf-color-border);
    border-radius: var(--pf-radius-lg);
  }

  .text-center { text-align: center; }
  .text-balance { text-wrap: balance; }
  .nowrap { white-space: nowrap; }
  .w-full { width: 100%; }
  .sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
      transition-duration: 0.01ms !important;
    }
  }
}

/* looks.css */
/*
 * @profullstack/css looks: whole-page art directions, opt-in.
 *
 *   @import "@profullstack/css";        (or <link> profullstack.css)
 *   @import "@profullstack/css/looks";
 *   <html data-look="neon|matrix|terminal|amber|synthwave|geocities|vaporwave">
 *
 * A look re-points the --pf-* tokens, so every component and widget follows it,
 * then adds its decoration (glow, scanlines, a grid floor, tiled stars). No new
 * classes: the only extra hooks are [data-look-marquee] (a scrolling banner the
 * geocities look shows) and canvas[data-look-fx] (a background canvas; the matrix
 * rain in examples/examples.js draws into it). All motion stops under
 * prefers-reduced-motion. Each look forces its own color-scheme.
 */
@layer pf.tokens, pf.reset, pf.base, pf.layout, pf.components, pf.widgets, pf.platform, pf.looks, pf.utilities;

@layer pf.looks {
  [data-look] h1 { text-shadow: var(--pf-look-glow, none); }
  [data-look] .badge { background: transparent; color: var(--pf-color-accent); border: 1px solid currentColor; }
  canvas[data-look-fx] { position: fixed; inset: 0; z-index: -1; pointer-events: none; width: 100vw; height: 100vh; }
  [data-look-marquee] { display: none; }

  @keyframes pf-look-blink { 50% { opacity: 0; } }
  @keyframes pf-look-flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: .55; } }
  @keyframes pf-look-grid { to { background-position: 0 40px, 0 0; } }
  @keyframes pf-look-marquee { to { transform: translateX(-100%); } }
  @keyframes pf-look-pulse { 50% { box-shadow: 0 0 0 10px rgb(225 29 72 / 0); } 0%, 100% { box-shadow: 0 0 0 0 rgb(225 29 72 / .45); } }
  @keyframes pf-look-aurora { to { background-position: 100% 60%; } }

  /* neon: pink and cyan tubes on black --------------------------------- */
  :root[data-look="neon"] {
    color-scheme: dark;
    --pf-color-canvas: #07020f; --pf-color-surface: #12051f; --pf-color-surface-raised: #1b0830;
    --pf-color-ink: #f2e9ff; --pf-color-ink-muted: #c7b4e8; --pf-color-border: #ff2bd6;
    --pf-color-primary: #33f6ff; --pf-color-primary-hover: #8ffaff; --pf-color-on-primary: #07020f;
    --pf-color-accent: #ff2bd6; --pf-color-focus: #33f6ff;
    --pf-look-glow: 0 0 6px #ff2bd6, 0 0 22px #ff2bd6, 0 0 48px #b3009a;
  }
  :root[data-look="neon"] body {
    background: radial-gradient(60rem 30rem at 80% -10%, rgb(255 43 214 / .25), transparent),
                radial-gradient(50rem 30rem at -10% 110%, rgb(51 246 255 / .2), transparent), #07020f;
  }
  :root[data-look="neon"] h1 { color: #ff2bd6; }
  :root[data-look="neon"] .card { box-shadow: 0 0 0 1px #ff2bd6, 0 0 24px rgb(255 43 214 / .35), inset 0 0 18px rgb(51 246 255 / .12); }
  :root[data-look="neon"] button, :root[data-look="neon"] .button { box-shadow: 0 0 14px #33f6ff; }

  /* matrix: phosphor green on black, rain canvas behind ------------------ */
  :root[data-look="matrix"] {
    color-scheme: dark;
    --pf-font-sans: var(--pf-font-mono);
    --pf-color-canvas: #000; --pf-color-surface: rgb(0 10 2 / .82); --pf-color-surface-raised: #001a06;
    --pf-color-ink: #b6ffc8; --pf-color-ink-muted: #6fdc8c; --pf-color-border: #00b32c;
    --pf-color-primary: #00ff41; --pf-color-primary-hover: #7dff9b; --pf-color-on-primary: #000;
    --pf-color-accent: #00ff41; --pf-color-focus: #7dff9b;
    --pf-look-glow: 0 0 8px #00ff41, 0 0 24px #008f11;
  }
  :root[data-look="matrix"] h1 { color: #00ff41; }

  /* terminal: a CLI session, prompt and block cursor -------------------- */
  :root[data-look="terminal"] {
    color-scheme: dark;
    --pf-font-sans: var(--pf-font-mono);
    --pf-color-canvas: #0b0b0b; --pf-color-surface: #121212; --pf-color-surface-raised: #1c1c1c;
    --pf-color-ink: #d0d0d0; --pf-color-ink-muted: #9e9e9e; --pf-color-border: #3a3a3a;
    --pf-color-primary: #5fd700; --pf-color-primary-hover: #87ff00; --pf-color-on-primary: #000;
    --pf-color-accent: #5fd7ff; --pf-color-focus: #5fd700;
    --pf-radius-md: 4px; --pf-radius-lg: 6px;
  }
  :root[data-look="terminal"] h1::before { content: "$ "; color: #5fd700; }
  :root[data-look="terminal"] h1::after { content: "\2588"; margin-inline-start: .1em; color: #5fd700; }
  :root[data-look="terminal"] .card { position: relative; padding-block-start: 2.2rem; }
  :root[data-look="terminal"] .card::before {
    content: "\25CF"; position: absolute; inset-block-start: .5rem; inset-inline-start: .9rem;
    font-size: .8rem; color: #ff5f56; text-shadow: 1.1em 0 #ffbd2e, 2.2em 0 #27c93f;
  }
  :root[data-look="terminal"] main li::marker { content: "> "; color: #5fd700; }

  /* amber: 1983 phosphor CRT with scanlines ------------------------------ */
  :root[data-look="amber"] {
    color-scheme: dark;
    --pf-font-sans: "VT323", var(--pf-font-mono);
    --pf-color-canvas: #0d0800; --pf-color-surface: #140c00; --pf-color-surface-raised: #1e1200;
    --pf-color-ink: #ffb000; --pf-color-ink-muted: #d99a2b; --pf-color-border: #8a5a00;
    --pf-color-primary: #ffb000; --pf-color-primary-hover: #ffcc66; --pf-color-on-primary: #1a0f00;
    --pf-color-accent: #ffcc66; --pf-color-focus: #ffcc66;
    --pf-look-glow: 0 0 6px #ffb000, 0 0 18px #a36b00;
  }
  :root[data-look="amber"] h1::after { content: "_"; }
  :root[data-look="amber"] body::after {
    content: ""; position: fixed; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(transparent 0 2px, rgb(0 0 0 / .28) 2px 3px);
  }

  /* synthwave: 1986 sunset, chrome type, a moving grid floor ------------- */
  :root[data-look="synthwave"] {
    color-scheme: dark;
    --pf-color-canvas: #12002b; --pf-color-surface: rgb(20 0 40 / .72); --pf-color-surface-raised: #2b0057;
    --pf-color-ink: #fff; --pf-color-ink-muted: #f3c6ff; --pf-color-border: #8c1eff;
    --pf-color-primary: #ff2975; --pf-color-primary-hover: #ff5c97; --pf-color-on-primary: #fff;
    --pf-color-accent: #ffd319; --pf-color-focus: #ffd319;
  }
  :root[data-look="synthwave"] body { background: linear-gradient(#0b0019 0%, #2b0057 45%, #ff2975 70%, #ffd319 72%, #12002b 72.2%) fixed; }
  :root[data-look="synthwave"] body::before {
    content: ""; position: fixed; inset-inline: -50%; inset-block-end: 0; block-size: 32vh; z-index: -1; pointer-events: none;
    transform: perspective(300px) rotateX(60deg); transform-origin: bottom;
    background: linear-gradient(transparent 0 94%, #ff2975 94%) 0 0 / 100% 40px,
                linear-gradient(90deg, transparent 0 96%, #ff2975 96%) 0 0 / 60px 100%;
  }
  :root[data-look="synthwave"] h1 {
    background: linear-gradient(#fff 0 45%, #ff9de2 50%, #8c1eff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 12px #ff2975); font-style: italic;
  }

  /* geocities: a 1997 homepage. Tiled stars, Comic Sans, bevels, marquee -- */
  :root[data-look="geocities"] {
    color-scheme: dark;
    --pf-font-sans: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
    --pf-color-canvas: #000033; --pf-color-surface: #000080; --pf-color-surface-raised: #0000a8;
    --pf-color-ink: #fff; --pf-color-ink-muted: #00ff00; --pf-color-border: #c0c0c0;
    --pf-color-primary: #c0c0c0; --pf-color-primary-hover: #e0e0e0; --pf-color-on-primary: #000;
    --pf-color-accent: #00ffff; --pf-color-focus: #ffff00;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="geocities"] body {
    background-color: #000033;
    background-image: radial-gradient(#fff 1px, transparent 1.5px), radial-gradient(#ffff66 1px, transparent 1.5px);
    background-size: 46px 46px, 73px 73px; background-position: 0 0, 20px 30px;
  }
  :root[data-look="geocities"] h1 { color: #ffff00; font-family: Impact, "Arial Black", sans-serif; text-shadow: 3px 3px 0 #f00, 6px 6px 0 #00f; }
  :root[data-look="geocities"] .card { border: 4px ridge #c0c0c0; }
  :root[data-look="geocities"] button, :root[data-look="geocities"] .button { border: 3px outset #fff; font-family: Tahoma, "MS Sans Serif", sans-serif; }
  :root[data-look="geocities"] input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"]), :root[data-look="geocities"] textarea, :root[data-look="geocities"] select { background: #fff; color: #000; border: 2px inset #c0c0c0; }
  :root[data-look="geocities"] a { text-decoration: underline; }
  :root[data-look="geocities"] a:visited { color: #ff00ff; }
  :root[data-look="geocities"] .badge::before, :root[data-look="geocities"] .badge::after { content: "\1F6A7"; margin-inline: .25em; }
  :root[data-look="geocities"] [data-look-marquee] {
    display: block; overflow: hidden; white-space: nowrap; padding-block: .25rem;
    background: #ffff00; color: #f00; font-weight: 700; border-block: 3px dashed #f00;
  }
  :root[data-look="geocities"] [data-look-marquee] > * { display: inline-block; padding-inline-start: 100%; }

  /* vaporwave: pastel 1995 desktop, window chrome on every card ---------- */
  :root[data-look="vaporwave"] {
    color-scheme: light;
    --pf-color-canvas: #ffd6f5; --pf-color-surface: rgb(255 255 255 / .8); --pf-color-surface-raised: #fff;
    --pf-color-ink: #2d1b46; --pf-color-ink-muted: #5b3f7a; --pf-color-border: #2d1b46;
    --pf-color-primary: #b967ff; --pf-color-primary-hover: #a04bff; --pf-color-on-primary: #fff;
    --pf-color-accent: #01a3cc; --pf-color-focus: #ff71ce;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="vaporwave"] body { background: linear-gradient(135deg, #ffd6f5, #c2f0ff 50%, #fffb96) fixed; }
  :root[data-look="vaporwave"] h1 { color: #ff71ce; letter-spacing: .3em; text-transform: uppercase; text-shadow: 3px 3px 0 #01cdfe, 6px 6px 0 #b967ff; }
  :root[data-look="vaporwave"] .card { position: relative; border: 2px solid #2d1b46; box-shadow: 6px 6px 0 #2d1b46; padding-block-start: 2.2rem; }
  :root[data-look="vaporwave"] .card::before {
    content: "\25AB  \25AB  \2715"; position: absolute; inset: 0 0 auto 0; block-size: 1.6rem; padding: .1rem .6rem;
    text-align: end; font-size: .85rem; color: #fff; background: linear-gradient(90deg, #b967ff, #01cdfe);
  }


  /* prodigy: 1990 Prodigy service. Navy screen, chunky NAPLPS-style blocks, the gray command bar */
  :root[data-look="prodigy"] {
    color-scheme: dark;
    --pf-font-sans: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --pf-color-canvas: #00006b; --pf-color-surface: #0000a8; --pf-color-surface-raised: #0010c8;
    --pf-color-ink: #fff; --pf-color-ink-muted: #ffff55; --pf-color-border: #55ffff;
    --pf-color-primary: #ff55ff; --pf-color-primary-hover: #ff8cff; --pf-color-on-primary: #000;
    --pf-color-accent: #55ffff; --pf-color-focus: #ffff55;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="prodigy"] body { padding-block-end: 3.25rem; }
  :root[data-look="prodigy"] h1 {
    display: inline-block; padding: .1em .45em; color: #000; background: #55ffff;
    box-shadow: .25em .25em 0 #ff55ff, .5em .5em 0 #ffff55; text-transform: uppercase; letter-spacing: .04em; margin-block-end: .7em;
  }
  :root[data-look="prodigy"] .card { border: 0; background: repeating-linear-gradient(90deg, #0000a8 0 24px, #0008b8 24px 48px); box-shadow: inset 0 6px 0 #55ffff; }
  :root[data-look="prodigy"] body::after {
    content: "NEXT \00a0\00a0 BACK \00a0\00a0 MENU \00a0\00a0 PATH \00a0\00a0 JUMP \00a0\00a0 HELP \00a0\00a0 EXIT";
    position: fixed; inset: auto 0 0 0; z-index: 10; pointer-events: none;
    padding: .7rem 1rem; text-align: center; font: 700 .85rem/1 Arial, sans-serif; letter-spacing: .12em;
    color: #000; background: linear-gradient(#e0e0e0, #a8a8a8); border-block-start: 3px solid #fff;
  }

  /* aol: 1996 AOL 3.0 on Windows. Teal desktop, gray chrome, navy title bars, You've Got Mail yellow */
  :root[data-look="aol"] {
    color-scheme: light;
    --pf-font-sans: Tahoma, "MS Sans Serif", Arial, sans-serif;
    --pf-color-canvas: #008080; --pf-color-surface: #c0c0c0; --pf-color-surface-raised: #d4d0c8;
    --pf-color-ink: #000; --pf-color-ink-muted: #202020; --pf-color-border: #808080;
    --pf-color-primary: #c0c0c0; --pf-color-primary-hover: #d4d0c8; --pf-color-on-primary: #000;
    --pf-color-accent: #000080; --pf-color-focus: #000080;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="aol"] main > header, :root[data-look="aol"] main > :first-child { color: #fff; }
  :root[data-look="aol"] h1 { color: #fff; text-shadow: 2px 2px 0 #000; }
  :root[data-look="aol"] h1::before { content: "\25B2 "; color: #ffcc00; text-shadow: 2px 2px 0 #0033cc; }
  :root[data-look="aol"] .card {
    position: relative; padding-block-start: 2.3rem; color: #000;
    border: 2px solid; border-color: #fff #404040 #404040 #fff; box-shadow: 1px 1px 0 #000;
  }
  :root[data-look="aol"] .card::before {
    content: "America Online"; position: absolute; inset: 2px 2px auto 2px; block-size: 1.5rem; padding: .15rem .5rem;
    font: 700 .8rem/1.2rem Tahoma, sans-serif; color: #fff; background: linear-gradient(90deg, #000080, #1084d0);
  }
  :root[data-look="aol"] .card::after {
    content: "_ \25A1 \2715"; position: absolute; inset: 4px 8px auto auto; font: 700 .7rem/1.1rem Tahoma, sans-serif; color: #fff;
  }
  :root[data-look="aol"] button, :root[data-look="aol"] .button { border: 2px solid; border-color: #fff #404040 #404040 #fff; color: #000; }
  :root[data-look="aol"] .badge { background: #ffcc00; color: #000; border-color: #000; }
  :root[data-look="aol"] .badge::before { content: "\2709  "; }
  :root[data-look="aol"] input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"]) { background: #fff; border: 2px solid; border-color: #404040 #fff #fff #404040; }

  /* compuserve: CompuServe Information Manager for DOS. Blue screen, cyan menu bar, double-line boxes */
  :root[data-look="compuserve"] {
    color-scheme: dark;
    --pf-font-sans: "Perfect DOS VGA 437", "Px437 IBM VGA8", ui-monospace, Consolas, monospace;
    --pf-color-canvas: #0000aa; --pf-color-surface: #0000aa; --pf-color-surface-raised: #0000c4;
    --pf-color-ink: #fff; --pf-color-ink-muted: #aaaaaa; --pf-color-border: #fff;
    --pf-color-primary: #00aaaa; --pf-color-primary-hover: #55ffff; --pf-color-on-primary: #000;
    --pf-color-accent: #ffff55; --pf-color-focus: #ffff55;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="compuserve"] body { padding-block-start: 1.6rem; }
  :root[data-look="compuserve"] body::before {
    content: " File  Edit  Services  Mail  Forums  Special  Window  Help          GO: "; white-space: pre;
    position: fixed; inset: 0 0 auto 0; z-index: 10; pointer-events: none; padding: .15rem .5rem;
    font: 1rem/1.3rem var(--pf-font-mono); color: #000; background: #00aaaa;
  }
  :root[data-look="compuserve"] h1 { color: #ffff55; }
  :root[data-look="compuserve"] .card { border: 6px double #fff; box-shadow: 8px 8px 0 #000; }
  :root[data-look="compuserve"] h2 { display: inline-block; padding-inline: .4em; color: #0000aa; background: #aaaaaa; }

  /* bbs: a 1993 dial-up board in ANSI. Black, CP437 shading, bright cyan and magenta */
  :root[data-look="bbs"] {
    color-scheme: dark;
    --pf-font-sans: "Perfect DOS VGA 437", "Px437 IBM VGA8", ui-monospace, Consolas, monospace;
    --pf-color-canvas: #000; --pf-color-surface: #000; --pf-color-surface-raised: #0a0a0a;
    --pf-color-ink: #aaaaaa; --pf-color-ink-muted: #55ffff; --pf-color-border: #aa00aa;
    --pf-color-primary: #ff55ff; --pf-color-primary-hover: #ff8cff; --pf-color-on-primary: #000;
    --pf-color-accent: #55ffff; --pf-color-focus: #ffff55;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="bbs"] h1 { color: #55ffff; text-shadow: 3px 0 #aa00aa; }
  :root[data-look="bbs"] h1::before, :root[data-look="bbs"] h1::after {
    content: "\2591\2592\2593\2588"; display: block; font-size: .5em; letter-spacing: 0; color: #aa00aa; text-shadow: none;
  }
  :root[data-look="bbs"] h1::after { content: "\2588\2593\2592\2591  [ C ]onnect  [ J ]oin  [ G ]oodbye"; color: #ff55ff; }
  :root[data-look="bbs"] .card { border: 2px dashed #aa00aa; box-shadow: 0 0 0 4px #000, 0 0 0 6px #55ffff; }
  :root[data-look="bbs"] h2 { color: #ffff55; }
  :root[data-look="bbs"] h2::before { content: "\00bb "; color: #ff55ff; }

  /* minitel: France, 1982. Videotex teletext: eight colors, double height, mosaic bars */
  :root[data-look="minitel"] {
    color-scheme: dark;
    --pf-font-sans: "Bedstead", "VT323", ui-monospace, monospace;
    --pf-color-canvas: #000; --pf-color-surface: #000; --pf-color-surface-raised: #111;
    --pf-color-ink: #fff; --pf-color-ink-muted: #00ffff; --pf-color-border: #0000ff;
    --pf-color-primary: #ffff00; --pf-color-primary-hover: #ffff80; --pf-color-on-primary: #000;
    --pf-color-accent: #00ff00; --pf-color-focus: #ff00ff;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="minitel"] body::before {
    content: ""; position: fixed; inset: 0 0 auto 0; block-size: 10px; z-index: 10; pointer-events: none;
    background: linear-gradient(90deg, #f00 0 14.28%, #0f0 0 28.56%, #ff0 0 42.84%, #00f 0 57.12%, #f0f 0 71.4%, #0ff 0 85.68%, #fff 0);
  }
  :root[data-look="minitel"] h1 { color: #ffff00; transform: scaleY(1.6); transform-origin: top left; margin-block-end: .6em; text-transform: uppercase; }
  :root[data-look="minitel"] .card { border: 0; border-inline-start: 12px solid #0000ff; background: #000; }
  :root[data-look="minitel"] h2 { color: #000; background: #00ffff; display: inline-block; padding-inline: .3em; }
  :root[data-look="minitel"] .badge::after { content: " 3615"; }


  /* ===== Modern magazine ============================================= */

  /* editorial: a print magazine. Serif display, drop cap, hairline rules, red kicker */
  :root[data-look="editorial"] {
    color-scheme: light;
    --pf-font-sans: "Iowan Old Style", "Charter", "Georgia", serif;
    --pf-color-canvas: #faf7f2; --pf-color-surface: #fffdf9; --pf-color-surface-raised: #fff;
    --pf-color-ink: #141414; --pf-color-ink-muted: #5a5550; --pf-color-border: #141414;
    --pf-color-primary: #141414; --pf-color-primary-hover: #333; --pf-color-on-primary: #faf7f2;
    --pf-color-accent: #c8102e; --pf-color-focus: #c8102e;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="editorial"] h1 { font-size: clamp(3rem, 9vw, 7rem); font-weight: 400; font-style: italic; letter-spacing: -.03em; line-height: .95; border-block-end: 1px solid #141414; padding-block-end: .2em; }
  :root[data-look="editorial"] .badge { border: 0; padding: 0; color: #c8102e; font-family: Helvetica, Arial, sans-serif; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
  :root[data-look="editorial"] .card { border: 0; border-block-start: 4px double #141414; box-shadow: none; background: transparent; }
  :root[data-look="editorial"] h1 + p::first-letter { float: left; font-size: 3.4em; line-height: .8; padding: .05em .08em 0 0; color: #c8102e; }
  :root[data-look="editorial"] h2 { font-style: italic; font-weight: 400; }

  /* swiss: International Typographic Style. Helvetica, flush left, red block, a strict grid */
  :root[data-look="swiss"] {
    color-scheme: light;
    --pf-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #f2f2f2;
    --pf-color-ink: #000; --pf-color-ink-muted: #333; --pf-color-border: #000;
    --pf-color-primary: #e30613; --pf-color-primary-hover: #b8000b; --pf-color-on-primary: #fff;
    --pf-color-accent: #e30613; --pf-color-focus: #e30613;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="swiss"] body { background: linear-gradient(90deg, #e30613 0 12px, transparent 12px), repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), rgb(0 0 0 / .05) calc(8.333% - 1px) 8.333%), #fff; }
  :root[data-look="swiss"] h1 { font-size: clamp(3rem, 10vw, 8rem); font-weight: 700; letter-spacing: -.05em; line-height: .88; text-transform: lowercase; }
  :root[data-look="swiss"] .badge { background: #e30613; color: #fff; border: 0; border-radius: 0; }
  :root[data-look="swiss"] .card { border: 0; border-block-start: 8px solid #000; box-shadow: none; }
  :root[data-look="swiss"] h2 { font-weight: 700; letter-spacing: -.02em; }

  /* brutalist: raw and loud. Mono labels, giant grotesk, black borders, hard offset shadows */
  :root[data-look="brutalist"] {
    color-scheme: light;
    --pf-font-sans: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --pf-color-canvas: #f4f400; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #000; --pf-color-ink-muted: #000; --pf-color-border: #000;
    --pf-color-primary: #000; --pf-color-primary-hover: #ff3b00; --pf-color-on-primary: #fff;
    --pf-color-accent: #ff3b00; --pf-color-focus: #0047ff;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="brutalist"] h1 { font-size: clamp(3.2rem, 12vw, 9rem); line-height: .85; text-transform: uppercase; letter-spacing: -.04em; -webkit-text-stroke: 2px #000; color: #fff; text-shadow: 6px 6px 0 #000; }
  :root[data-look="brutalist"] .card { border: 4px solid #000; box-shadow: 10px 10px 0 #000; }
  :root[data-look="brutalist"] button, :root[data-look="brutalist"] .button { border: 3px solid #000; box-shadow: 5px 5px 0 #000; text-transform: uppercase; }
  :root[data-look="brutalist"] button:hover, :root[data-look="brutalist"] .button:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; }
  :root[data-look="brutalist"] .badge { background: #000; color: #f4f400; font-family: var(--pf-font-mono); }
  :root[data-look="brutalist"] input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"]) { border: 3px solid #000; }

  /* glass: flashy modern. Aurora gradient mesh, frosted translucent cards, gradient type */
  :root[data-look="glass"] {
    color-scheme: dark;
    --pf-font-sans: "Inter", "SF Pro Display", system-ui, sans-serif;
    --pf-color-canvas: #0b0620; --pf-color-surface: rgb(255 255 255 / .08); --pf-color-surface-raised: rgb(255 255 255 / .14);
    --pf-color-ink: #f5f3ff; --pf-color-ink-muted: #c4b5fd; --pf-color-border: rgb(255 255 255 / .22);
    --pf-color-primary: #a78bfa; --pf-color-primary-hover: #c4b5fd; --pf-color-on-primary: #0b0620;
    --pf-color-accent: #22d3ee; --pf-color-focus: #f0abfc;
    --pf-radius-md: 18px; --pf-radius-lg: 28px;
  }
  :root[data-look="glass"] body {
    background: radial-gradient(40rem 30rem at 15% 10%, #7c3aed99, transparent 60%), radial-gradient(35rem 30rem at 85% 20%, #06b6d488, transparent 60%),
                radial-gradient(40rem 35rem at 50% 100%, #db277788, transparent 60%), #0b0620 fixed;
  }
  :root[data-look="glass"] h1 { font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 800; letter-spacing: -.04em; background: linear-gradient(100deg, #fff, #c4b5fd 40%, #22d3ee 70%, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
  :root[data-look="glass"] .card { background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .18); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 20px 60px rgb(0 0 0 / .35), inset 0 1px 0 rgb(255 255 255 / .25); }
  :root[data-look="glass"] button, :root[data-look="glass"] .button { background: linear-gradient(100deg, #a78bfa, #22d3ee); border: 0; border-radius: 999px; color: #0b0620; }
  :root[data-look="glass"] .badge { background: rgb(255 255 255 / .1); color: #f0abfc; border-color: rgb(255 255 255 / .25); backdrop-filter: blur(8px); }

  /* bento: product-launch keynote. Soft off-white, big tight type, rounded tiles of mixed sizes */
  :root[data-look="bento"] {
    color-scheme: light;
    --pf-font-sans: "SF Pro Display", "Inter", system-ui, sans-serif;
    --pf-color-canvas: #f5f5f7; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #1d1d1f; --pf-color-ink-muted: #6e6e73; --pf-color-border: transparent;
    --pf-color-primary: #0071e3; --pf-color-primary-hover: #0077ed; --pf-color-on-primary: #fff;
    --pf-color-accent: #bf4800; --pf-color-focus: #0071e3;
    --pf-radius-md: 18px; --pf-radius-lg: 28px;
  }
  :root[data-look="bento"] h1 { font-size: clamp(3rem, 9vw, 6rem); font-weight: 700; letter-spacing: -.045em; line-height: 1; }
  :root[data-look="bento"] .card { border: 0; box-shadow: 0 2px 12px rgb(0 0 0 / .06); padding: clamp(1.25rem, 3vw, 2.25rem); }
  :root[data-look="bento"] .grid > .card:first-child { background: linear-gradient(160deg, #1d1d1f, #3a3a3c); color: #f5f5f7; }
  :root[data-look="bento"] .grid > .card:first-child h2 { background: linear-gradient(90deg, #ff9f0a, #ff375f, #bf5af2); -webkit-background-clip: text; background-clip: text; color: transparent; }
  :root[data-look="bento"] .grid > .card:first-child :is(.alert, input, select, textarea) { color: #1d1d1f; }
  :root[data-look="bento"] button, :root[data-look="bento"] .button { border-radius: 999px; }
  :root[data-look="bento"] .badge { border: 0; background: transparent; color: #bf4800; font-weight: 600; padding: 0; }


  /* ===== High converting =============================================
     Built on landing-page conversion basics: one focal headline, one high-contrast
     call to action, short line length, trust cues near the button, nothing that
     competes with the form. A/B test them against each other (@profullstack/abtest). */

  /* The call to action is always a filled primary button, also inside a .field-group. */
  :root:is([data-look="clarity"], [data-look="split"], [data-look="midnight"], [data-look="urgency"]) :is(.field-group > button, button[type="submit"]) {
    background: var(--pf-color-primary); color: var(--pf-color-on-primary); border-color: var(--pf-color-primary); font-weight: 700;
  }
  :root:is([data-look="clarity"], [data-look="split"], [data-look="midnight"], [data-look="urgency"]) :is(.field-group > button, button[type="submit"]):hover { background: var(--pf-color-primary-hover); }

  /* clarity: white, centered, one huge benefit line and an orange button */
  :root[data-look="clarity"] {
    color-scheme: light;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #f8fafc;
    --pf-color-ink: #0f172a; --pf-color-ink-muted: #475569; --pf-color-border: #e2e8f0;
    --pf-color-primary: #f97316; --pf-color-primary-hover: #ea580c; --pf-color-on-primary: #fff;
    --pf-color-accent: #16a34a; --pf-color-focus: #f97316;
    --pf-radius-md: 10px; --pf-radius-lg: 14px;
  }
  :root[data-look="clarity"] main > header { text-align: center; align-items: center; margin-inline: auto; max-inline-size: 46rem; }
  :root[data-look="clarity"] main > header form { margin-inline: auto; }
  :root[data-look="clarity"] h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
  :root[data-look="clarity"] button, :root[data-look="clarity"] .button { font-weight: 700; font-size: 1.05rem; padding-inline: 1.4rem; box-shadow: 0 8px 20px rgb(249 115 22 / .35); }
  :root[data-look="clarity"] .badge { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }
  :root[data-look="clarity"] .card { box-shadow: 0 1px 3px rgb(15 23 42 / .08); }

  /* split: copy on white at left, a saturated brand panel at right, one indigo button */
  :root[data-look="split"] {
    color-scheme: light;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #eef2ff;
    --pf-color-ink: #111827; --pf-color-ink-muted: #4b5563; --pf-color-border: #e5e7eb;
    --pf-color-primary: #4f46e5; --pf-color-primary-hover: #4338ca; --pf-color-on-primary: #fff;
    --pf-color-accent: #4f46e5; --pf-color-focus: #4f46e5;
    --pf-radius-md: 8px; --pf-radius-lg: 12px;
  }
  :root[data-look="split"] body { background: linear-gradient(90deg, #fff 0 58%, #4f46e5 58% 100%) fixed; }
  :root[data-look="split"] body::before {
    content: ""; position: fixed; inset: 0 0 0 58%; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgb(255 255 255 / .25) 0 8rem, transparent 8rem), radial-gradient(circle at 70% 75%, rgb(255 255 255 / .12) 0 12rem, transparent 12rem);
  }
  :root[data-look="split"] main > header { max-inline-size: 52%; }
  :root[data-look="split"] h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; letter-spacing: -.03em; }
  :root[data-look="split"] .card { box-shadow: 0 10px 30px rgb(17 24 39 / .12); }
  @media (max-width: 52rem) {
    :root[data-look="split"] body { background: linear-gradient(#fff 0 70%, #4f46e5 70%) fixed; }
    :root[data-look="split"] body::before { display: none; }
    :root[data-look="split"] main > header { max-inline-size: none; }
  }

  /* midnight: dark SaaS launch. Faint grid, a glowing violet CTA, social-proof friendly */
  :root[data-look="midnight"] {
    color-scheme: dark;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #08090a; --pf-color-surface: #111214; --pf-color-surface-raised: #17181b;
    --pf-color-ink: #f7f8f8; --pf-color-ink-muted: #8a8f98; --pf-color-border: #23252a;
    --pf-color-primary: #7c5cff; --pf-color-primary-hover: #9278ff; --pf-color-on-primary: #fff;
    --pf-color-accent: #a78bfa; --pf-color-focus: #a78bfa;
    --pf-radius-md: 10px; --pf-radius-lg: 14px;
  }
  :root[data-look="midnight"] body { background: radial-gradient(50rem 22rem at 50% -6rem, rgb(124 92 255 / .35), transparent 70%), linear-gradient(rgb(255 255 255 / .03) 1px, transparent 1px) 0 0 / 100% 48px, linear-gradient(90deg, rgb(255 255 255 / .03) 1px, transparent 1px) 0 0 / 48px 100%, #08090a; }
  :root[data-look="midnight"] h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 600; letter-spacing: -.04em; background: linear-gradient(180deg, #fff 30%, #8a8f98); -webkit-background-clip: text; background-clip: text; color: transparent; }
  :root[data-look="midnight"] button, :root[data-look="midnight"] .button { box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 0 24px rgb(124 92 255 / .55); }
  :root[data-look="midnight"] .badge { background: rgb(124 92 255 / .12); border-color: rgb(124 92 255 / .4); color: #c4b5fd; }

  /* urgency: limited-launch energy. Black on yellow, a red badge, a pulsing CTA */
  :root[data-look="urgency"] {
    color-scheme: light;
    --pf-font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
    --pf-color-canvas: #fff8db; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #111; --pf-color-ink-muted: #3f3f3f; --pf-color-border: #111;
    --pf-color-primary: #e11d48; --pf-color-primary-hover: #be123c; --pf-color-on-primary: #fff;
    --pf-color-accent: #e11d48; --pf-color-focus: #111;
    --pf-radius-md: 6px; --pf-radius-lg: 8px;
  }
  :root[data-look="urgency"] body { background: linear-gradient(#ffd400 0 6px, transparent 6px), #fff8db; }
  :root[data-look="urgency"] h1 { font-size: clamp(2.6rem, 7.5vw, 5rem); font-weight: 900; letter-spacing: -.035em; text-transform: uppercase; }
  :root[data-look="urgency"] .badge { background: #e11d48; color: #fff; border-color: #e11d48; text-transform: uppercase; letter-spacing: .08em; }
  :root[data-look="urgency"] .badge::before { content: "\25CF  "; }
  :root[data-look="urgency"] button, :root[data-look="urgency"] .button { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
  :root[data-look="urgency"] .card { border: 2px solid #111; box-shadow: 6px 6px 0 #ffd400; }

  /* ===== Gallery ===================================================== */

  /* whitecube: a contemporary gallery. White walls, wide margins, small captions */
  :root[data-look="whitecube"] {
    color-scheme: light;
    --pf-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #fafafa;
    --pf-color-ink: #111; --pf-color-ink-muted: #8a8a8a; --pf-color-border: #ececec;
    --pf-color-primary: #111; --pf-color-primary-hover: #333; --pf-color-on-primary: #fff;
    --pf-color-accent: #111; --pf-color-focus: #111;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="whitecube"] h1 { font-weight: 300; letter-spacing: .02em; font-size: clamp(2.2rem, 5vw, 3.6rem); }
  :root[data-look="whitecube"] .card { border: 0; box-shadow: none; padding: 0; background: transparent; }
  :root[data-look="whitecube"] figure img, :root[data-look="whitecube"] figure > :first-child { box-shadow: 0 30px 60px -30px rgb(0 0 0 / .35); }
  :root[data-look="whitecube"] figcaption { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #8a8a8a; }
  :root[data-look="whitecube"] .badge { border: 0; padding: 0; color: #8a8a8a; letter-spacing: .2em; text-transform: uppercase; }

  /* darkroom: photography. Near-black, work lit from above, red safelight accents */
  :root[data-look="darkroom"] {
    color-scheme: dark;
    --pf-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --pf-color-canvas: #0a0a0a; --pf-color-surface: #121212; --pf-color-surface-raised: #1a1a1a;
    --pf-color-ink: #ededed; --pf-color-ink-muted: #8d8d8d; --pf-color-border: #262626;
    --pf-color-primary: #ff3b30; --pf-color-primary-hover: #ff6259; --pf-color-on-primary: #fff;
    --pf-color-accent: #ff3b30; --pf-color-focus: #ff3b30;
    --pf-radius-sm: 0; --pf-radius-md: 2px; --pf-radius-lg: 2px;
  }
  :root[data-look="darkroom"] body { background: radial-gradient(60rem 30rem at 50% -10rem, rgb(255 59 48 / .14), transparent 70%), #0a0a0a; }
  :root[data-look="darkroom"] h1 { font-weight: 200; letter-spacing: .12em; text-transform: uppercase; }
  :root[data-look="darkroom"] figure > :first-child { box-shadow: 0 0 0 1px #262626, 0 0 60px rgb(255 255 255 / .06); }
  :root[data-look="darkroom"] figcaption { color: #8d8d8d; font-size: .8rem; }
  :root[data-look="darkroom"] .card { background: #0f0f0f; }

  /* polaroid: instant photos pinned to cork, handwritten captions */
  :root[data-look="polaroid"] {
    color-scheme: light;
    --pf-font-sans: "Segoe Print", "Bradley Hand", "Marker Felt", "Comic Neue", cursive;
    --pf-color-canvas: #c8a26b; --pf-color-surface: #fdfcf7; --pf-color-surface-raised: #fff;
    --pf-color-ink: #2b2118; --pf-color-ink-muted: #5c4a38; --pf-color-border: #e7e1d3;
    --pf-color-primary: #2b2118; --pf-color-primary-hover: #4a3a2a; --pf-color-on-primary: #fdfcf7;
    --pf-color-accent: #c0392b; --pf-color-focus: #c0392b;
    --pf-radius-sm: 2px; --pf-radius-md: 2px; --pf-radius-lg: 2px;
  }
  :root[data-look="polaroid"] body { background: radial-gradient(#b48c55 1px, transparent 1.5px) 0 0 / 7px 7px, radial-gradient(#d9b67f 1px, transparent 1.5px) 3px 4px / 9px 9px, #c8a26b; }
  :root[data-look="polaroid"] h1 { color: #fdfcf7; text-shadow: 2px 2px 0 #2b2118; }
  :root[data-look="polaroid"] .card, :root[data-look="polaroid"] figure { background: #fdfcf7; padding: .8rem .8rem 2.6rem; border: 0; box-shadow: 0 10px 18px rgb(0 0 0 / .3); }
  :root[data-look="polaroid"] .grid > :nth-child(odd) { rotate: -1.6deg; }
  :root[data-look="polaroid"] .grid > :nth-child(even) { rotate: 1.3deg; }
  :root[data-look="polaroid"] .grid > :nth-child(3n) { rotate: -.6deg; }
  :root[data-look="polaroid"] figcaption { text-align: center; font-size: 1.05rem; }

  /* ===== Shop ======================================================== */

  /* storefront: a clean store. Product tiles, prices in bold, a green buy button */
  :root[data-look="storefront"] {
    color-scheme: light;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #f6f6f4; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #1a1a1a; --pf-color-ink-muted: #6b6b6b; --pf-color-border: #e6e6e2;
    --pf-color-primary: #008060; --pf-color-primary-hover: #006e52; --pf-color-on-primary: #fff;
    --pf-color-accent: #d72c0d; --pf-color-focus: #008060;
    --pf-radius-md: 10px; --pf-radius-lg: 14px;
  }
  :root[data-look="storefront"] h1 { font-weight: 700; letter-spacing: -.02em; }
  :root[data-look="storefront"] .card { border: 1px solid #e6e6e2; box-shadow: none; transition: box-shadow var(--pf-transition-fast); }
  :root[data-look="storefront"] .card:hover { box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
  :root[data-look="storefront"] [data-price]:not(button) { font-weight: 700; font-size: 1.1rem; }
  :root[data-look="storefront"] s { color: #6b6b6b; }

  /* boutique: luxury. Ivory and black, spaced capitals, a thin gold line */
  :root[data-look="boutique"] {
    color-scheme: light;
    --pf-font-sans: "Didot", "Bodoni 72", "Playfair Display", Georgia, serif;
    --pf-color-canvas: #f7f3ec; --pf-color-surface: #f7f3ec; --pf-color-surface-raised: #fff;
    --pf-color-ink: #0d0d0d; --pf-color-ink-muted: #6f675c; --pf-color-border: #b8a27a;
    --pf-color-primary: #0d0d0d; --pf-color-primary-hover: #2a2a2a; --pf-color-on-primary: #f7f3ec;
    --pf-color-accent: #b8a27a; --pf-color-focus: #b8a27a;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="boutique"] h1 { font-weight: 400; letter-spacing: .3em; text-transform: uppercase; font-size: clamp(2rem, 5vw, 3.4rem); text-align: center; }
  :root[data-look="boutique"] main > header { text-align: center; align-items: center; border-block: 1px solid #b8a27a; padding-block: 2rem; }
  :root[data-look="boutique"] .card { border: 0; background: transparent; box-shadow: none; text-align: center; }
  :root[data-look="boutique"] button, :root[data-look="boutique"] .button { letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; font-family: "Helvetica Neue", Arial, sans-serif; }
  :root[data-look="boutique"] .badge { border: 0; color: #b8a27a; letter-spacing: .3em; text-transform: uppercase; }

  /* market: creator shop. Pink and yellow, chunky borders, sticker badges */
  :root[data-look="market"] {
    color-scheme: light;
    --pf-font-sans: "Mabry", "Inter", system-ui, sans-serif;
    --pf-color-canvas: #ff90e8; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #000; --pf-color-ink-muted: #222; --pf-color-border: #000;
    --pf-color-primary: #ffc900; --pf-color-primary-hover: #ffd83d; --pf-color-on-primary: #000;
    --pf-color-accent: #23a094; --pf-color-focus: #000;
    --pf-radius-sm: 4px; --pf-radius-md: 6px; --pf-radius-lg: 8px;
  }
  :root[data-look="market"] h1 { font-weight: 800; letter-spacing: -.03em; }
  :root[data-look="market"] .card { border: 2px solid #000; box-shadow: 4px 4px 0 #000; }
  :root[data-look="market"] button, :root[data-look="market"] .button { border: 2px solid #000; box-shadow: 3px 3px 0 #000; font-weight: 700; }
  :root[data-look="market"] .badge { background: #23a094; color: #fff; border: 2px solid #000; rotate: -3deg; }
  :root[data-look="market"] [data-price]:not(button) { display: inline-block; padding: .1em .5em; background: #ff90e8; border: 2px solid #000; clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%); font-weight: 800; }

  @media (prefers-reduced-motion: no-preference) {
    :root[data-look="neon"] h1 { animation: pf-look-flicker 6s infinite; }
    :root[data-look="terminal"] h1::after, :root[data-look="amber"] h1::after { animation: pf-look-blink 1.05s steps(1) infinite; }
    :root[data-look="synthwave"] body::before { animation: pf-look-grid 1.2s linear infinite; }
    :root[data-look="geocities"] [data-look-marquee] > * { animation: pf-look-marquee 14s linear infinite; }
    :root[data-look="geocities"] .badge { animation: pf-look-blink 1s steps(1) infinite; }
    :root[data-look="bbs"] h1::after, :root[data-look="minitel"] .badge { animation: pf-look-blink 1.2s steps(1) infinite; }
    :root[data-look="urgency"] main > header button { animation: pf-look-pulse 1.8s ease-in-out infinite; }
    :root[data-look="glass"] body { animation: pf-look-aurora 18s ease-in-out infinite alternate; background-size: 140% 140%; }
  }
}

/* charts.css */
:where(.pfc) {
  /* Each color reads the @profullstack/css token first, so a chart on a page that uses
     @profullstack/css matches it (light, dark and data-theme) with no extra CSS. */
  --pfc-text: var(--pf-color-ink, #1f2328);
  --pfc-muted: var(--pf-color-ink-muted, #59636e);
  --pfc-bg: var(--pf-color-surface, #ffffff);
  --pfc-grid: var(--pf-color-border, rgba(31, 35, 40, 0.1));
  --pfc-axis: var(--pf-color-ink-muted, rgba(31, 35, 40, 0.35));
  --pfc-crosshair: var(--pf-color-ink-muted, rgba(31, 35, 40, 0.6));
  --pfc-up: var(--pf-color-success, #0b7a5c);
  --pfc-down: var(--pf-color-danger, #d1242f);
  --pfc-focus: var(--pf-color-focus, #0969da);
  --pfc-radius: var(--pf-radius-md, 8px);
  color: var(--pfc-text);
  font: 13px/1.4 var(--pf-font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  position: relative;
  display: block;
  min-width: 0;
}
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"]) .pfc) {
    --pfc-text: var(--pf-color-ink, #e6edf3);
    --pfc-muted: var(--pf-color-ink-muted, #9198a1);
    --pfc-bg: var(--pf-color-surface, #0d1117);
    --pfc-grid: var(--pf-color-border, rgba(230, 237, 243, 0.1));
    --pfc-axis: var(--pf-color-ink-muted, rgba(230, 237, 243, 0.35));
    --pfc-crosshair: var(--pf-color-ink-muted, rgba(230, 237, 243, 0.6));
    --pfc-up: var(--pf-color-success, #26a69a);
    --pfc-down: var(--pf-color-danger, #f7525f);
    --pfc-focus: var(--pf-color-focus, #4493f8);
    --pfc-c0: #56B4E9; --pfc-c1: #F0A050; --pfc-c2: #3CC79A; --pfc-c3: #E08FC0;
    --pfc-c4: #F0C040; --pfc-c5: #8FD3F5; --pfc-c6: #B79CE0; --pfc-c7: #A8A8A8;
  }
}
:where([data-theme="dark"] .pfc, .pfc[data-theme="dark"]) {
  --pfc-text: var(--pf-color-ink, #e6edf3); --pfc-muted: var(--pf-color-ink-muted, #9198a1);
  --pfc-bg: var(--pf-color-surface, #0d1117); --pfc-grid: var(--pf-color-border, rgba(230, 237, 243, 0.1));
  --pfc-axis: var(--pf-color-ink-muted, rgba(230, 237, 243, 0.35));
  --pfc-crosshair: var(--pf-color-ink-muted, rgba(230, 237, 243, 0.6));
  --pfc-up: var(--pf-color-success, #26a69a); --pfc-down: var(--pf-color-danger, #f7525f);
  --pfc-focus: var(--pf-color-focus, #4493f8);
  --pfc-c0: #56B4E9; --pfc-c1: #F0A050; --pfc-c2: #3CC79A; --pfc-c3: #E08FC0;
  --pfc-c4: #F0C040; --pfc-c5: #8FD3F5; --pfc-c6: #B79CE0; --pfc-c7: #A8A8A8;
}
:where(.pfc-figure) { margin: 0; }
:where(.pfc-title) { font-weight: 600; font-size: 1.05em; margin: 0 0 0.5em; }
:where(.pfc-plot, .pfc-stage) { position: relative; border-radius: var(--pfc-radius); outline: none; }
:where(.pfc-plot, .pfc-stage):focus-visible { box-shadow: 0 0 0 2px var(--pfc-focus); }
:where(.pfc-svg) { display: block; overflow: visible; max-width: 100%; height: auto; }
:where(.pfc-axis text) { fill: var(--pfc-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
:where(.pfc-grid) { stroke: var(--pfc-grid); }
:where(.pfc-zero, .pfc-domain) { stroke: var(--pfc-axis); }
:where(.pfc-line) { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
:where(.pfc-area) { fill-opacity: 0.18; stroke: none; }
:where(.pfc-bar) { transition: opacity 0.15s; }
:where(.pfc-point) { fill-opacity: 0.8; stroke: var(--pfc-bg); stroke-width: 1; }
:where(.pfc-guide) { stroke: var(--pfc-crosshair); stroke-dasharray: 3 3; }
:where(.pfc-active) { fill: var(--pfc-bg); stroke-width: 2.5; }
:where(.pfc-band) { fill: var(--pfc-text); opacity: 0.06; }
:where(.pfc-slice) { stroke: var(--pfc-bg); stroke-width: 1.5; }
:where(.pfc-slice-label) { fill: #fff; font-size: 11px; font-weight: 600; paint-order: stroke; stroke: rgba(0,0,0,0.35); stroke-width: 2px; }
:where(.pfc-center-value) { fill: var(--pfc-text); font-size: 20px; font-weight: 700; }
:where(.pfc-center-label) { fill: var(--pfc-muted); font-size: 12px; }
:where(.pfc-tooltip) {
  position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none;
  background: var(--pfc-bg); color: var(--pfc-text); border: 1px solid var(--pfc-grid);
  border-radius: 6px; padding: 6px 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
:where(.pfc-tooltip i, .pfc-legend i) { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
:where(.pfc-tooltip b) { margin-left: 4px; }
:where(.pfc-legend) { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 6px; }
:where(.pfc-legend button, .pfc-toolbar button, .pfc-toolbar select, .pfc-menu summary) {
  font: inherit; font-size: 12px; color: inherit; background: transparent; cursor: pointer;
  border: 1px solid var(--pfc-grid); border-radius: 6px; padding: 3px 8px; min-height: 28px;
  display: inline-flex; align-items: center; gap: 6px;
}
:where(.pfc-legend button[aria-pressed="false"]) { opacity: 0.45; text-decoration: line-through; }
:where(.pfc-legend button:focus-visible, .pfc-toolbar :focus-visible, .pfc-table summary:focus-visible) { outline: 2px solid var(--pfc-focus); outline-offset: 1px; }
:where(.pfc-table) { margin-top: 6px; font-size: 12px; }
:where(.pfc-table summary) { cursor: pointer; color: var(--pfc-muted); width: max-content; }
:where(.pfc-table-scroll) { max-height: 260px; overflow: auto; }
:where(.pfc-table table) { border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 4px; }
:where(.pfc-table th, .pfc-table td) { padding: 3px 10px; border-bottom: 1px solid var(--pfc-grid); text-align: right; }
:where(.pfc-table th:first-child) { text-align: left; }
:where(.pfc-sr) { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:where(.pfc-sparkline) { display: inline-block; vertical-align: middle; }
:where(.pfc-spark) { display: block; }

/* trading chart */
:where(.pfc-toolbar) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
:where(.pfc-group) { display: inline-flex; gap: 2px; flex-wrap: wrap; }
:where(.pfc-group button[aria-pressed="true"]) { background: var(--pfc-text); color: var(--pfc-bg); border-color: var(--pfc-text); }
:where(.pfc-toolbar select) { background: var(--pfc-bg); }
:where(.pfc-menu) { position: relative; }
:where(.pfc-menu summary) { list-style: none; }
:where(.pfc-menu summary::-webkit-details-marker) { display: none; }
:where(.pfc-menu-list) {
  position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 170px;
  background: var(--pfc-bg); border: 1px solid var(--pfc-grid); border-radius: 8px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); display: grid; gap: 2px;
}
:where(.pfc-menu-list label) { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
:where(.pfc-menu-list label:hover) { background: var(--pfc-grid); }
:where(.pfc-live) { color: var(--pfc-up); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
:where(.pfc-live)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pfc-pulse 1.4s infinite; }
@keyframes pfc-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { :where(.pfc-live)::before { animation: none; } }
:where(.pfc-canvas) { display: block; touch-action: none; cursor: crosshair; }
:where(.pfc-ohlc) {
  position: absolute; top: 4px; left: 8px; right: 80px; pointer-events: none; font-size: 12px;
  font-variant-numeric: tabular-nums; line-height: 1.5; text-shadow: 0 0 3px var(--pfc-bg);
}
:where(.pfc-ohlc b) { font-weight: 600; margin-right: 4px; }
:where(.pfc-ind) { display: flex; flex-wrap: wrap; gap: 0 10px; }
:where(.pfc-muted) { color: var(--pfc-muted); }
:where(.pfc-up) { color: var(--pfc-up); }
:where(.pfc-down) { color: var(--pfc-down); }
/* more charts */
:where(.pfc-on) { stroke: var(--pfc-text); stroke-width: 2; }
:where(.pfc-cell) { stroke: transparent; }
:where(.pfc-cell-label, .pfc-bar-value, .pfc-funnel-value) { font-size: 11px; font-variant-numeric: tabular-nums; }
:where(.pfc-bar-value, .pfc-funnel-value, .pfc-funnel-label, .pfc-radar-label) { fill: var(--pfc-text); font-size: 12px; }
:where(.pfc-scale) { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--pfc-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
:where(.pfc-scale i) { display: inline-block; width: 140px; height: 10px; border-radius: 3px; }
:where(.pfc-steps b) { display: inline-block; width: 11px; height: 11px; border-radius: 2px; }
:where(.pfc-track) { fill: var(--pfc-grid); }
:where(.pfc-radar-area) { fill-opacity: 0.15; stroke-width: 2; }
:where(.pfc-tm-group) { fill: none; stroke: var(--pfc-grid); }
:where(.pfc-tm-group-label) { fill: var(--pfc-text); font-size: 11px; font-weight: 600; }
:where(.pfc-tm-leaf) { stroke: var(--pfc-bg); }
:where(.pfc-tm-value) { font-weight: 400; }
:where(.pfc-box) { stroke: currentColor; stroke-width: 1.5; }
:where(.pfc-box-body) { fill: currentColor; fill-opacity: 0.18; }
:where(.pfc-box-median) { stroke-width: 3; }
:where(.pfc-box-outlier) { fill: var(--pfc-bg); }
:where(.pfc-bubble) { fill-opacity: 0.55; stroke: var(--pfc-bg); }
:where(.pfc-depth-area) { fill-opacity: 0.18; }
:where(.pfc-depth-line) { fill: none; stroke-width: 2; }
:where(.pfc-depth-head) { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
:where(.pfc-stat) { display: grid; gap: 2px; }
:where(.pfc-stat-label) { color: var(--pfc-muted); font-size: 13px; }
:where(.pfc-stat-value) { font-size: 2rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
:where(.pfc-stat-delta) { font-size: 13px; font-weight: 600; }
@media (forced-colors: active) {
  :where(.pfc-line) { stroke: CanvasText !important; }
  :where(.pfc-bar, .pfc-slice, .pfc-point) { forced-color-adjust: none; }
  :where(.pfc-group button[aria-pressed="true"]) { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* waitlist.css */
/* @profullstack/waitlist: page layer on top of @profullstack/css tokens (--pf-*). */
.waitlist-page { min-height: 100dvh; display: flex; flex-direction: column; }
.waitlist-page > main { flex: 1; }
.waitlist-hero { padding-block: clamp(2.5rem, 8vw, 6rem) 2rem; }
.waitlist-hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
.waitlist-hero .waitlist-tagline { font-size: clamp(1.1rem, 2.4vw, 1.45rem); color: var(--pf-color-muted, inherit); max-width: 40rem; }
.waitlist-kicker { font-family: var(--pf-font-mono, ui-monospace, monospace); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.waitlist-form .field-group { max-width: 34rem; }
.waitlist-form .field-group input { flex: 1; min-width: 0; }
.waitlist-points li { margin-block: 0.35rem; }
.waitlist-stats [data-empty] { color: var(--pf-color-muted, inherit); margin: 0; }
.waitlist-meta { font-size: 0.9rem; color: var(--pf-color-muted, inherit); }
/* The footer band: the site's links and small print, then the network footers, on the
   look's surface so they read on any page background. Everything inside inherits its ink. */
.waitlist-footers { margin-block-start: 3rem; padding-block: 1.75rem 2rem; background: var(--pf-color-surface, Canvas); color: var(--pf-color-ink, CanvasText); border-block-start: 2px solid var(--pf-color-border, currentColor); text-align: center; }
.waitlist-foot { display: grid; gap: 0.4rem; justify-items: center; margin-block-end: 1.5rem; }
.waitlist-foot p { margin: 0; max-width: 46rem; }
.waitlist-foot-links { font-family: var(--pf-font-mono, ui-monospace, monospace); font-size: 0.85rem; letter-spacing: 0.04em; }
.waitlist-footers .waitlist-meta { color: color-mix(in srgb, currentColor 78%, transparent); }
.waitlist-footers .pfs-footer { border-block-start-color: color-mix(in srgb, currentColor 22%, transparent); padding-block-start: 1.25rem; }
.waitlist-footers a { text-underline-offset: 0.18em; }
.waitlist-answer { max-width: 40rem; margin: 0; }
.waitlist-faq { margin-block: 1.5rem; }
.waitlist-faq details { border-block-start: 1px solid var(--pf-color-border, currentColor); padding-block: 0.6rem; }
.waitlist-faq summary { cursor: pointer; font-weight: 600; }
.waitlist-faq details p { margin-block: 0.5rem 0; }

/* Looks (neon, matrix, terminal, amber, synthwave, geocities, vaporwave) come from
   @profullstack/css/looks: <html data-look="...">. Only page tweaks live here. */
[data-look] .waitlist-hero h1 { font-size: clamp(2.2rem, 7vw, 4.5rem); }

/* book: the Profullstack pitch and <book-a-call> (0.6.0) */
.waitlist-book .waitlist-pitch li { padding-block: 0.25rem; }
.book-call { border: 1px solid var(--border, currentColor); border-radius: var(--radius, 0.5rem); padding: 1rem; }
.book-head { display: flex; flex-direction: column; gap: 0.125rem; }
.book-days, .book-times { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.book-days button, .book-times button { min-width: 5.5rem; }
.book-nav { display: flex; justify-content: space-between; gap: 0.5rem; }
.book-call button.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: inherit; }
.book-call[data-state="booked"] .cluster { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.waitlist-book, .waitlist-promo { margin-block: 2rem; }
/* search plugin: tabs, sorts and result cards, in whatever look the page wears */
.wl-tabs ul, ul.wl-tabs, .wl-sorts ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.wl-tabs a, .wl-sorts a { display: inline-block; padding: .3rem .7rem; background: var(--pf-color-surface, Canvas); border: 1px solid var(--pf-color-border, currentColor); border-radius: 999px; text-decoration: none; }
.wl-tabs a[aria-current="page"], .wl-sorts a[aria-current="page"] { background: var(--pf-color-primary); color: var(--pf-color-on-primary); font-weight: 700; }
.wl-tabs small { opacity: .7; }
.wl-sorts { margin-block: .5rem 1rem; font-size: .9em; }
.wl-results { list-style: none; padding: 0; display: grid; gap: .8rem; }
.wl-hit { display: flex; gap: .9rem; align-items: flex-start; }
.wl-hit p { margin: 0; }
.wl-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex: none; }
.wl-results-images { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.wl-hit-image { display: grid; gap: .4rem; }
.wl-hit-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.wl-search .field-group { display: flex; gap: .4rem; }
.wl-search input[type="search"] { flex: 1; min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* community: the header bar with the Community link (0.11.0) */
.waitlist-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.waitlist-nav-home { font-weight: 700; text-decoration: none; color: inherit; }
.waitlist-nav-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.waitlist-nav-links a { text-decoration: none; padding: .35rem .8rem; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); color: inherit; font-size: .9rem; }
.waitlist-nav-links a:hover { border-color: currentColor; }
.waitlist-nav-links a.waitlist-community { background: var(--pf-color-primary, currentColor); color: var(--pf-color-on-primary, #fff); border-color: transparent; font-weight: 700; }
.waitlist-nav-links a.waitlist-community:hover { filter: brightness(1.1); }

/* advisor plugin: the question box on advisor/ (src/advisor-client.js). */
site-advisor { display: block; }
.advisor-section, .builder-section { margin-block-start: 2rem; }
.builder-section pre, .card pre { overflow-x: auto; }
.advisor-section pre { overflow-x: auto; }
.advisor-turn { padding-block: 0.6rem; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.advisor-who { margin: 0 0 0.2rem; font-size: 0.8em; }
.advisor-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.advisor-user .advisor-text { font-weight: 600; }
.advisor-error { padding: 0.6rem 0.8rem; border: 1px solid currentColor; border-radius: 0.4rem; }
.advisor-examples { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.advisor-example { font-size: 0.85em; }
.advisor-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* news plugin: a source ticker, readable article pages and a quiet subscription form */
.wl-news-card, .wl-newsletter { margin-block: 2rem; }
.wl-news-card h2, .wl-news-feature h2 { margin-block: 0; }
.wl-news-tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .25rem 0; }
.wl-news-ticker { border-block: 1px solid var(--pf-color-border, currentColor); padding-block: .8rem; margin-block: 1.5rem; }
.wl-news-ticker ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.wl-news-ticker li { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; align-items: baseline; gap: .6rem; }
.wl-news-ticker time, .wl-news-ticker small, .wl-news-related small, .wl-news-sources small { color: var(--pf-color-muted, inherit); font-size: .85em; }
.wl-news-article { max-width: 46rem; margin-inline: auto; }
.wl-news-article section + section { margin-block-start: 1.5rem; }
.wl-news-citation { font-family: var(--pf-font-mono, ui-monospace, monospace); font-size: .82em; margin-inline-start: .15em; }
.wl-news-related, .wl-news-sources ol { display: grid; gap: .7rem; }
.wl-news-related li, .wl-news-sources li { padding-inline-start: .25rem; }
.wl-news-related small, .wl-news-sources small { display: block; }
.wl-newsletter { max-width: 44rem; }
.wl-newsletter p { max-width: 38rem; }
.waitlist-games-optin { display: flex; align-items: flex-start; gap: .55rem; margin-top: .6rem; max-width: 42rem; color: var(--pf-color-muted, currentColor); font-size: .9rem; }
.waitlist-games-optin input { flex: none; margin-top: .3rem; }
.pf-games-link { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--pf-color-primary, currentColor); color: var(--pf-color-on-primary, Canvas); padding: .55rem 1rem; font-weight: 700; text-decoration: none; }
.pf-games-link:hover { filter: brightness(1.12); }
@media (max-width: 42rem) {
  .wl-news-ticker li { grid-template-columns: 1fr; gap: .1rem; }
}
