/*
 * The design tokens of the public site (KID-1324), from the canvas's style tile and components boards
 * (docs/implementation/KID-1324-canvas/boards/StyleB.dc.html, ComponentsB.dc.html).
 *
 * The cascade layers, in order: every rule of the site is in one, so a later layer wins over an earlier one
 * regardless of specificity, and nothing unlayered is needed.
 */
@layer tokens, reset, base, layout, components, pages, utilities;

@layer tokens {
  /* The light values, also set on a tool's printable result (.kp-sheet), which is paper in both themes */
  :root,
  .kp-sheet {
    color-scheme: light;

    /* Brand: purple is ink, yellow is the spark */
    --kp-purple: #3d3082;
    --kp-purple-deep: #261e50;
    --kp-night: #1c163d;
    --kp-yellow: #ffcd02;
    --kp-lavender: #efecf8;
    --kp-lavender-2: #e4e0f5;
    --kp-purple-4: #c9c3e6;
    /* A soft yellow surface (the home page's Free to start tile) and the text on it */
    --kp-yellow-soft: #fff6cc;
    --kp-on-soft: #221c4a;

    /* Surfaces */
    --kp-bg: #ffffff;
    --kp-alt: #efecf8;
    --kp-alt-2: #e4e0f5;
    --kp-card: #ffffff;
    --kp-paper: #faf8f3;
    --kp-border: #e6e2ef;
    --kp-border-2: #c9c3e6;
    /* The dots of a list in an article */
    --kp-dot: #c9c3e6;
    --kp-band: #3d3082;
    --kp-footer: #1c163d;
    --kp-nav-bg: rgb(255 255 255 / 0.7);

    /* Text */
    --kp-ink: #221c4a;
    --kp-ink-2: #4b4768;
    --kp-muted: #6b6788;
    --kp-head: #3d3082;
    --kp-brand: #3d3082;
    --kp-brand-2: #5a4ba8;
    --kp-link-hover: #261e50;
    --kp-disabled: #a9a3c4;
    --kp-error: #b3261e;

    /* Actions */
    --kp-btn-bg: #3d3082;
    --kp-btn-ink: #ffffff;
    --kp-btn-hover: #261e50;
    --kp-btn-active: #1c163d;
    --kp-btn-2-bg: #efecf8;
    --kp-btn-2-hover: #e4e0f5;
    --kp-btn-2-active: #c9c3e6;
    --kp-focus: #3d3082;

    /* Stars */
    --kp-star: #ffcd02;
    --kp-star-stroke: #d9a900;
    --kp-star-empty: #e6e2ef;

    /* Elevation: flat by default, shadows only for what floats */
    --kp-shadow-1: 0 8px 24px rgb(23 19 46 / 0.14);
    --kp-shadow-2: 0 24px 64px rgb(23 19 46 / 0.22);
    --kp-float-border: transparent;
    --kp-sheet-border: transparent;

    /* Devices: the frames are night in both modes */
    --kp-bezel: #17132e;
    --kp-bezel-ring: transparent;

    /* Type: Nunito for display, Mulish for body; the scripts without them are set by :lang() below */
    --kp-font-display: Nunito, ui-rounded, system-ui, sans-serif;
    --kp-font-body: Mulish, system-ui, -apple-system, "Segoe UI", sans-serif;
    --kp-display-weight: 900;
    --kp-display-tracking: -0.02em;
    --kp-display-tracking-tight: -0.03em;
    --kp-display-leading: 1.05;
    --kp-body-leading: 1.55;
    --kp-eyebrow-case: uppercase;
    --kp-eyebrow-tracking: 0.07em;
    --kp-heading-leading: 1.15;
    --kp-title-leading: 1.3;
    --kp-reading-leading: 1.6;
    --kp-ui-leading: 1.25;
    --kp-label-tracking: 0.06em;

    /* The type scale, fluid from a 390 px phone to a 1440 px desktop */
    --kp-text-display-1: clamp(3rem, 1.7rem + 5.3333vw, 6.5rem);
    --kp-text-display-2: clamp(2.75rem, 1.7286rem + 4.1905vw, 5.5rem);
    --kp-text-h2: clamp(2rem, 1.6286rem + 1.5238vw, 3rem);
    --kp-text-h3: clamp(1.375rem, 1.2821rem + 0.381vw, 1.625rem);
    --kp-text-title: clamp(1.0625rem, 1.0161rem + 0.1905vw, 1.1875rem);
    --kp-text-stat: clamp(3.25rem, 2.9714rem + 1.1429vw, 4rem);
    --kp-text-lead: clamp(1.125rem, 1.0554rem + 0.2857vw, 1.3125rem);
    --kp-text-body-l: clamp(1.0625rem, 1.0161rem + 0.1905vw, 1.1875rem);
    --kp-text-body: 1rem;
    --kp-text-small: clamp(0.875rem, 0.8518rem + 0.0952vw, 0.9375rem);
    --kp-text-caption: 0.8125rem;
    --kp-text-eyebrow: clamp(0.75rem, 0.7268rem + 0.0952vw, 0.8125rem);

    /* Spacing: a 4 px base, and the fluid page margin and section gap */
    --kp-space-1: 0.25rem;
    --kp-space-2: 0.5rem;
    --kp-space-3: 0.75rem;
    --kp-space-4: 1rem;
    --kp-space-5: 1.25rem;
    --kp-space-6: 1.5rem;
    --kp-space-7: 1.75rem;
    --kp-space-8: 2rem;
    --kp-gutter: clamp(1.25rem, 0.6rem + 2.6667vw, 3rem);
    --kp-section: clamp(4rem, 2.8857rem + 4.5714vw, 7rem);

    /* Layout: one container, two narrower measures */
    --kp-container: 80rem;
    --kp-measure-wide: 53.75rem;
    --kp-measure: 45rem;

    /* Radius: anything pressed is a pill; containers step down as they nest */
    --kp-radius-xs: 0.5rem;
    --kp-radius-sm: 0.875rem;
    --kp-radius-md: 1.25rem;
    --kp-radius-lg: 1.75rem;
    --kp-radius-xl: 2rem;
    --kp-radius-pill: 999px;

    /* Motion */
    --kp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --kp-duration: 150ms;

    /* Touch */
    --kp-target: 2.75rem;

    /* App accents: only in the home page's drawings of the apps (decided 2026-10-25). Each is the stage's color, a
       tint and a text color on the tint. The drawings' neutral parts are the --kp-g-* tokens. */
    --kp-accent-doggy-time: #f2a65a;
    --kp-accent-doggy-time-tint: #fdf0e2;
    --kp-accent-doggy-time-text: #8f4a12;
    --kp-accent-potty-whiz: #3cc1c6;
    --kp-accent-potty-whiz-tint: #e3f6f6;
    --kp-accent-potty-whiz-text: #0f6467;
    --kp-accent-fever-whiz: #f2836b;
    --kp-accent-fever-whiz-tint: #fdebe6;
    --kp-accent-fever-whiz-text: #a0391f;
    --kp-accent-chore-boss: #5dbb7a;
    --kp-accent-chore-boss-tint: #e7f5eb;
    --kp-accent-chore-boss-text: #21633a;
    --kp-accent-kid-hop: #4ba3e8;
    --kp-accent-kid-hop-tint: #e5f1fc;
    --kp-accent-kid-hop-text: #195a91;
    --kp-g-card: #ffffff;
    --kp-g-bar: #e6e2ef;
    --kp-g-bar-strong: #c9c3e6;
    --kp-g-purple: #3d3082;
    --kp-g-line: #221c4a;

    /* The assistant demo's people (KID-1339): the circles of their initials in its sample family's log, the same
       in both modes, with night ink */
    --kp-person-teal: #3cc1c6;
    --kp-person-yellow: #ffcd02;
    --kp-person-lilac: #a99cf0;
    --kp-person-orange: #f2a65a;
    --kp-person-lavender: #c9c3e6;
    --kp-person-ink: #1c163d;
  }

  /*
   * Dark mode: follows the system unless the visitor chose a theme (html[data-theme], from the kp_theme cookie).
   * The two blocks are the same; CSS cannot share one declaration block between a media query and a selector.
   * Screen only, so a page always prints light.
   */
  @media screen and (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --kp-bg: #17132e;
      --kp-alt: #1d1840;
      --kp-alt-2: #2c2560;
      --kp-card: #221c45;
      --kp-paper: #17132e;
      --kp-border: #342c63;
      --kp-border-2: #4a4180;
      --kp-dot: #8b80c9;
      --kp-band: #3d3082;
      --kp-footer: #0f0c22;
      --kp-nav-bg: rgb(255 255 255 / 0.08);
      --kp-ink: #eeebf8;
      --kp-ink-2: #d6d2ea;
      --kp-muted: #a9a3c4;
      --kp-head: #eeebf8;
      --kp-brand: #a99cf0;
      --kp-brand-2: #a99cf0;
      --kp-link-hover: #eeebf8;
      --kp-disabled: #6b6788;
      --kp-error: #ff9b8a;
      --kp-btn-bg: #ffcd02;
      --kp-btn-ink: #1c163d;
      --kp-btn-hover: #ffd83d;
      --kp-btn-active: #e6b800;
      --kp-btn-2-bg: #2c2560;
      --kp-btn-2-hover: #342c63;
      --kp-btn-2-active: #4a4180;
      --kp-focus: #ffcd02;
      --kp-star-stroke: #ffcd02;
      --kp-star-empty: #4a4180;
      --kp-shadow-1: 0 8px 24px rgb(0 0 0 / 0.45);
      --kp-shadow-2: 0 24px 64px rgb(0 0 0 / 0.6);
      --kp-float-border: #342c63;
      --kp-sheet-border: #4a4180;
      --kp-bezel: #0f0c22;
      --kp-bezel-ring: #4a4180;
      --kp-yellow-soft: #3a3320;
      --kp-on-soft: #ffe680;
      --kp-accent-doggy-time: #b07a4d;
      --kp-accent-doggy-time-tint: #473549;
      --kp-accent-doggy-time-text: #f7c08a;
      --kp-accent-potty-whiz: #318d98;
      --kp-accent-potty-whiz-tint: #273a5c;
      --kp-accent-potty-whiz-text: #7fdade;
      --kp-accent-fever-whiz: #b06159;
      --kp-accent-fever-whiz-tint: #472f4c;
      --kp-accent-fever-whiz-text: #f7ab9a;
      --kp-accent-chore-boss: #488963;
      --kp-accent-chore-boss-tint: #2d394f;
      --kp-accent-chore-boss-text: #8fd6a5;
      --kp-accent-kid-hop: #3b78b0;
      --kp-accent-kid-hop-tint: #293462;
      --kp-accent-kid-hop-text: #8cc4f2;
      --kp-g-card: #2a2352;
      --kp-g-bar: #4a4180;
      --kp-g-bar-strong: #8b80c9;
      --kp-g-purple: #a99cf0;
      --kp-g-line: #eeebf8;
    }
  }

  @media screen {
    :root[data-theme="dark"] {
      color-scheme: dark;
      --kp-bg: #17132e;
      --kp-alt: #1d1840;
      --kp-alt-2: #2c2560;
      --kp-card: #221c45;
      --kp-paper: #17132e;
      --kp-border: #342c63;
      --kp-border-2: #4a4180;
      --kp-dot: #8b80c9;
      --kp-band: #3d3082;
      --kp-footer: #0f0c22;
      --kp-nav-bg: rgb(255 255 255 / 0.08);
      --kp-ink: #eeebf8;
      --kp-ink-2: #d6d2ea;
      --kp-muted: #a9a3c4;
      --kp-head: #eeebf8;
      --kp-brand: #a99cf0;
      --kp-brand-2: #a99cf0;
      --kp-link-hover: #eeebf8;
      --kp-disabled: #6b6788;
      --kp-error: #ff9b8a;
      --kp-btn-bg: #ffcd02;
      --kp-btn-ink: #1c163d;
      --kp-btn-hover: #ffd83d;
      --kp-btn-active: #e6b800;
      --kp-btn-2-bg: #2c2560;
      --kp-btn-2-hover: #342c63;
      --kp-btn-2-active: #4a4180;
      --kp-focus: #ffcd02;
      --kp-star-stroke: #ffcd02;
      --kp-star-empty: #4a4180;
      --kp-shadow-1: 0 8px 24px rgb(0 0 0 / 0.45);
      --kp-shadow-2: 0 24px 64px rgb(0 0 0 / 0.6);
      --kp-float-border: #342c63;
      --kp-sheet-border: #4a4180;
      --kp-bezel: #0f0c22;
      --kp-bezel-ring: #4a4180;
      --kp-yellow-soft: #3a3320;
      --kp-on-soft: #ffe680;
      --kp-accent-doggy-time: #b07a4d;
      --kp-accent-doggy-time-tint: #473549;
      --kp-accent-doggy-time-text: #f7c08a;
      --kp-accent-potty-whiz: #318d98;
      --kp-accent-potty-whiz-tint: #273a5c;
      --kp-accent-potty-whiz-text: #7fdade;
      --kp-accent-fever-whiz: #b06159;
      --kp-accent-fever-whiz-tint: #472f4c;
      --kp-accent-fever-whiz-text: #f7ab9a;
      --kp-accent-chore-boss: #488963;
      --kp-accent-chore-boss-tint: #2d394f;
      --kp-accent-chore-boss-text: #8fd6a5;
      --kp-accent-kid-hop: #3b78b0;
      --kp-accent-kid-hop-tint: #293462;
      --kp-accent-kid-hop-text: #8cc4f2;
      --kp-g-card: #2a2352;
      --kp-g-bar: #4a4180;
      --kp-g-bar-strong: #8b80c9;
      --kp-g-purple: #a99cf0;
      --kp-g-line: #eeebf8;
    }
  }

  /*
   * The type tokens follow each element's language, not only the page's, so text in another script keeps its own
   * faces: the locale menu's "Русский" on a Japanese page is set in Mulish, not the Japanese face's wide Cyrillic.
   * Base (Latin and Cyrillic) first, then the scripts without Nunito and Mulish.
   */
  :is(:lang(en), :lang(de), :lang(es), :lang(fr), :lang(it), :lang(nl), :lang(pt), :lang(ru)) {
    --kp-font-display: Nunito, ui-rounded, system-ui, sans-serif;
    --kp-font-body: Mulish, system-ui, -apple-system, "Segoe UI", sans-serif;
    --kp-display-weight: 900;
    --kp-display-tracking: -0.02em;
    --kp-display-tracking-tight: -0.03em;
    --kp-display-leading: 1.05;
    --kp-body-leading: 1.55;
    --kp-eyebrow-case: uppercase;
    --kp-eyebrow-tracking: 0.07em;
    --kp-heading-leading: 1.15;
    --kp-title-leading: 1.3;
    --kp-reading-leading: 1.6;
    --kp-ui-leading: 1.25;
    --kp-label-tracking: 0.06em;
  }

  /*
   * Every script (the style tile's rules per script). German and Russian keep the brand faces;
   * Japanese, Korean, Chinese and Hindi have no Nunito or Mulish glyphs, so they get system faces,
   * with Nunito first in display text so app names and numbers keep the brand face.
   */
  :lang(ja) {
    --kp-font-display: Nunito, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
    --kp-font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  }

  :lang(ko) {
    --kp-font-display: Nunito, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    --kp-font-body: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  }

  :lang(zh) {
    --kp-font-display: Nunito, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --kp-font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  }

  :lang(hi) {
    --kp-font-display: "Noto Sans Devanagari", "Kohinoor Devanagari", Nunito, sans-serif;
    --kp-font-body: "Noto Sans Devanagari", "Kohinoor Devanagari", Mulish, system-ui, sans-serif;
  }

  :is(:lang(ja), :lang(ko), :lang(zh)) {
    --kp-display-weight: 800;
    --kp-display-tracking: 0;
    --kp-display-tracking-tight: 0;
    --kp-display-leading: 1.3;
    --kp-body-leading: 1.8;
    --kp-eyebrow-case: none;
    --kp-eyebrow-tracking: 0;
    --kp-heading-leading: 1.3;
    --kp-title-leading: 1.45;
    --kp-reading-leading: 1.8;
    --kp-ui-leading: 1.4;
    --kp-label-tracking: 0;
  }

  :lang(hi) {
    --kp-display-weight: 800;
    --kp-display-tracking: 0;
    --kp-display-tracking-tight: 0;
    --kp-display-leading: 1.35;
    --kp-body-leading: 1.8;
    --kp-eyebrow-case: none;
    --kp-eyebrow-tracking: 0;
    --kp-heading-leading: 1.35;
    --kp-title-leading: 1.5;
    --kp-reading-leading: 1.8;
    --kp-ui-leading: 1.45;
    --kp-label-tracking: 0;
  }
}
/*
 * Nunito (display) and Mulish (body), variable weights, self-hosted (KID-1324).
 * Google Fonts' subsets, so a page loads only the scripts it uses; SIL Open Font License, see app/assets/fonts/site/OFL-*.txt.
 * Japanese, Korean, Chinese and Hindi use system faces (tokens.css).
 */

/* Nunito, latin */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/nunito-latin-c42173e8ae36763722585e63882271fb45cbb1d2c6b20079fd86f1afd604b353.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Nunito, latin-ext */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/nunito-latin-ext-440aaf264fa602ed1bdd9ef69459a891e8d050510c77b1786152dbbc22cecebe.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Nunito, cyrillic */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/nunito-cyrillic-df4a495285c22ade811b14169f150e11ca5c773850984555e653391d141c3256.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Nunito, cyrillic-ext */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/nunito-cyrillic-ext-6031b3b38c68317559bbaa5eb609260bb11bc602aa4f7c47d674985197b24630.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Mulish italic, latin */
@font-face {
  font-family: "Mulish";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-italic-latin-6daf9f79b110cfccfaa40fa0f0006228099258664c01cdbaf696ac529e7585d4.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Mulish italic, latin-ext */
@font-face {
  font-family: "Mulish";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-italic-latin-ext-9dd2e8fc390978fb66b5ee9340f1b52d1270025bc4b70f4fc971359bdb6ff184.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Mulish italic, cyrillic */
@font-face {
  font-family: "Mulish";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-italic-cyrillic-c94b3e7caded79a10c67726abb758a072d95e7f18865b924bad25ea1313ecf5d.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Mulish italic, cyrillic-ext */
@font-face {
  font-family: "Mulish";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-italic-cyrillic-ext-0c49f7775058e8287c56bd91958376c22bb7cb380b46994545611429b11cb7fb.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Mulish, latin */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-latin-b9a0451346765a6c1e9580c450edde1886d9bfd928fa1fa6127657f1ac55cd0b.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Mulish, latin-ext */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-latin-ext-71f0b0e0e74635618c6503fb6e920d7439ab7738bdfeb86e57cfcdb46a4203e4.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Mulish, cyrillic */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-cyrillic-07136c13909f83845a957c58a2a29202f962829433a2fcc4672ff33b4dd25cc1.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Mulish, cyrillic-ext */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/site/mulish-cyrillic-ext-f044b05232e0150fc8b7b976da9e959aa3b9674e7de4044b68df27c3b3ee8a10.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* A small reset, then the elements' defaults from the tokens (KID-1324). */

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

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

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

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

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

  img {
    height: auto;
  }

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

  button {
    cursor: pointer;
  }

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

@layer base {
  html {
    background: var(--kp-bg);
    scroll-padding-top: 5rem;
  }

  body {
    min-height: 100vh;
    background: var(--kp-bg);
    color: var(--kp-ink);
    font-family: var(--kp-font-body);
    font-size: var(--kp-text-body);
    line-height: var(--kp-body-leading);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  /* An element in another language than the page re-reads the font tokens its language sets (tokens.css). */
  :where(body [lang]) {
    font-family: var(--kp-font-body);
  }

  h1,
  h2,
  h3,
  h4 {
    font-family: var(--kp-font-display);
    font-weight: var(--kp-display-weight);
    line-height: var(--kp-display-leading);
    letter-spacing: var(--kp-display-tracking);
    color: var(--kp-head);
    text-wrap: balance;
  }

  h3,
  h4 {
    color: var(--kp-ink);
    letter-spacing: 0;
  }

  p {
    text-wrap: pretty;
  }

  a {
    color: var(--kp-brand);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
    transition: color var(--kp-duration) var(--kp-ease);
  }

  a:hover {
    color: var(--kp-link-hover);
  }

  strong,
  b {
    font-weight: 800;
  }

  /* One focus ring everywhere, for the keyboard only: 3 px, 2 px outside the shape, following its radius. */
  :focus-visible {
    outline: 3px solid var(--kp-focus);
    outline-offset: 2px;
  }

  :focus:not(:focus-visible) {
    outline: none;
  }

  ::selection {
    background: var(--kp-yellow);
    color: var(--kp-night);
  }

  /* Numbers that change or line up: ratings, counts, prices, timers. */
  data,
  time,
  .kp-tabular {
    font-variant-numeric: tabular-nums;
  }

  /* German and Russian: hyphenate long words in headings and card titles only, never in leads or body. */
  :is(:lang(de), :lang(ru), :lang(nl)) :is(h1, h2, h3, h4, .kp-title) {
    hyphens: auto;
    -webkit-hyphenate-limit-before: 5;
    -webkit-hyphenate-limit-after: 5;
    hyphenate-limit-chars: 12 5 5;
  }

  /* Japanese: phrase-aware line breaks, so a line never splits a word (Chrome; others break between characters). */
  :lang(ja) {
    line-break: strict;
    word-break: auto-phrase;
  }

  :lang(ko) {
    word-break: keep-all;
  }

  :lang(zh) {
    line-break: strict;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
    }
  }
}
/*
 * Page structure (KID-1324): one container, two narrower measures, sections spaced by the fluid section gap.
 * Breakpoints: phones up to 639 px, tablets 640 to 1023 px, desktops from 1024 px. Grids inside components
 * change by their container's width (container queries) rather than the viewport's.
 */

@layer layout {
  .kp-skip {
    position: absolute;
    inset-block-start: var(--kp-space-3);
    inset-inline-start: var(--kp-space-3);
    z-index: 100;
    padding: var(--kp-space-3) var(--kp-space-5);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-200%);
  }

  .kp-skip:focus-visible {
    transform: none;
  }

  .kp-container {
    width: 100%;
    max-width: calc(var(--kp-container) + 2 * var(--kp-gutter));
    margin-inline: auto;
    padding-inline: var(--kp-gutter);
  }

  .kp-container--wide-measure {
    max-width: calc(var(--kp-measure-wide) + 2 * var(--kp-gutter));
  }

  .kp-container--measure {
    max-width: calc(var(--kp-measure) + 2 * var(--kp-gutter));
  }

  .kp-section {
    padding-block: var(--kp-section);
  }

  .kp-section + .kp-section {
    padding-block-start: 0;
  }

  .kp-section--alt {
    background: var(--kp-alt);
  }

  .kp-section--alt + .kp-section,
  .kp-section + .kp-section--alt {
    padding-block-start: var(--kp-section);
  }

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

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

  /* A grid of cards: one column on a narrow container, then two, then the count asked for. */
  .kp-grid {
    container-type: inline-size;
  }

  .kp-grid > .kp-grid__items {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
  }

  @container (min-width: 40rem) {
    .kp-grid > .kp-grid__items {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container (min-width: 60rem) {
    .kp-grid > .kp-grid__items {
      grid-template-columns: repeat(var(--kp-grid-columns, 3), minmax(0, 1fr));
    }
  }

  .kp-main {
    display: block;
  }

  .kp-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
/*
 * The app cards' drawings in motion (KID-1354): each drawing (site/graphics/_<app>) plays one story of at most
 * 5 seconds while its card has is-playing (motion_controller.js, whose PLAY_MS is that length: change both together).
 * Outside a play the drawing shows its finished state, which is where every keyframe ends, so it settles without a
 * jump; the bursts, ripples, pulses and puffs are seen only while it plays. A part's delay is --kp-gfx-delay, set
 * on it in the drawing. There is no motion for a visitor who asks for less.
 */

@layer components {
  /* The finished state */
  .kp-gfx-center {
    transform-box: fill-box;
    transform-origin: center;
  }

  .kp-gfx-draw,
  .kp-gfx-check {
    stroke-dasharray: 100 100;
  }

  .kp-gfx-burst,
  .kp-gfx-ripple,
  .kp-gfx-pulse,
  .kp-gfx-puff {
    opacity: 0;
  }

  .kp-gfx-burst path {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
  }

  /* The story: one play, every part waiting in its first frame during its delay */
  @media (prefers-reduced-motion: no-preference) {
    .kp-app-card.is-playing .kp-gfx-blink { animation: kp-gfx-blink 2.4s ease-in-out var(--kp-gfx-delay, 0s) 2 both; }
    .kp-app-card.is-playing .kp-gfx-tilt { animation: kp-gfx-tilt 4.8s ease-in-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-ear-l { animation: kp-gfx-ear-l 2.4s ease-in-out var(--kp-gfx-delay, 0s) 2 both; }
    .kp-app-card.is-playing .kp-gfx-ear-r { animation: kp-gfx-ear-r 2.4s ease-in-out var(--kp-gfx-delay, 0s) 2 both; }
    .kp-app-card.is-playing .kp-gfx-swing { animation: kp-gfx-swing 1.2s ease-in-out var(--kp-gfx-delay, 0s) 4 both; }
    .kp-app-card.is-playing .kp-gfx-rise { animation: kp-gfx-rise 0.8s var(--kp-gfx-spring) var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-ripple { animation: kp-gfx-ripple 1s ease-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-twinkle { animation: kp-gfx-twinkle 1.6s ease-in-out var(--kp-gfx-delay, 0s) 2 both; }
    .kp-app-card.is-playing .kp-gfx-float { animation: kp-gfx-float 2.4s ease-in-out var(--kp-gfx-delay, 0s) 2 both; }
    .kp-app-card.is-playing .kp-gfx-pop { animation: kp-gfx-pop 0.8s ease-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-burst { animation: kp-gfx-burst 0.7s ease-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-draw { animation: kp-gfx-draw 2s ease-in-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-pulse { animation: kp-gfx-pulse 1.2s ease-out var(--kp-gfx-delay, 0s) 2 both; }
    .kp-app-card.is-playing .kp-gfx-dose { animation: kp-gfx-dose 1.6s var(--kp-gfx-overshoot) var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-mercury { animation: kp-gfx-mercury 1.6s var(--kp-gfx-overshoot) var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-drop { animation: kp-gfx-drop 1s ease-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-flip { animation: kp-gfx-flip 1.2s ease-in-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-fill { animation: kp-gfx-fill 0.5s ease-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-check { animation: kp-gfx-check 0.4s ease-out var(--kp-gfx-delay, 0s) both; }
    .kp-app-card.is-playing .kp-gfx-drive { animation: kp-gfx-drive 2.4s ease-in-out var(--kp-gfx-delay, 0s) 2 both; }
    .kp-app-card.is-playing .kp-gfx-bounce { animation: kp-gfx-bounce 0.3s ease-in-out var(--kp-gfx-delay, 0s) 16 both; }
    .kp-app-card.is-playing .kp-gfx-puff { animation: kp-gfx-puff 0.8s ease-out var(--kp-gfx-delay, 0s) 5 both; }
    .kp-app-card.is-playing .kp-gfx-wave { animation: kp-gfx-wave 0.8s ease-in-out var(--kp-gfx-delay, 0s) 3 both; }
    .kp-app-card.is-playing .kp-gfx-hop { animation: kp-gfx-hop 1s ease-in-out var(--kp-gfx-delay, 0s) both; }
  }

  .kp-app-card {
    --kp-gfx-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --kp-gfx-overshoot: cubic-bezier(0.34, 1.3, 0.64, 1);
  }

  @keyframes kp-gfx-blink {
    0%, 40%, 48%, 100% { transform: scaleY(1); }
    44% { transform: scaleY(0.1); }
  }

  @keyframes kp-gfx-tilt {
    0%, 20%, 75%, 100% { transform: rotate(0deg); }
    30%, 60% { transform: rotate(-8deg); }
  }

  @keyframes kp-gfx-ear-l {
    0%, 30%, 50%, 100% { transform: rotate(0deg); }
    38% { transform: rotate(-18deg); }
    44% { transform: rotate(-6deg); }
  }

  @keyframes kp-gfx-ear-r {
    0%, 30%, 50%, 100% { transform: rotate(0deg); }
    38% { transform: rotate(18deg); }
    44% { transform: rotate(6deg); }
  }

  @keyframes kp-gfx-swing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-22deg); }
    75% { transform: rotate(22deg); }
  }

  @keyframes kp-gfx-rise {
    0% { transform: translateY(14px) scale(0.96); opacity: 0; }
    60% { transform: translateY(-3px) scale(1); opacity: 1; }
    100% { transform: none; opacity: 1; }
  }

  @keyframes kp-gfx-ripple {
    0% { transform: scale(1); opacity: 0; }
    10% { opacity: 0.7; }
    100% { transform: scale(2.2); opacity: 0; }
  }

  @keyframes kp-gfx-twinkle {
    0%, 100% { transform: none; opacity: 1; }
    50% { transform: scale(0.3) rotate(45deg); opacity: 0.4; }
  }

  @keyframes kp-gfx-float {
    0%, 100% { transform: none; }
    50% { transform: translateY(-9px) rotate(-2deg); }
  }

  @keyframes kp-gfx-pop {
    0% { transform: scale(0) rotate(-40deg); opacity: 0; }
    50% { transform: scale(1.45) rotate(8deg); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: none; opacity: 1; }
  }

  @keyframes kp-gfx-burst {
    0% { transform: scale(0.4); opacity: 0; }
    20% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
  }

  @keyframes kp-gfx-draw {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
  }

  @keyframes kp-gfx-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.2); opacity: 0; }
  }

  @keyframes kp-gfx-dose {
    from { stroke-dasharray: 20 189; }
    to { stroke-dasharray: 122 189; }
  }

  @keyframes kp-gfx-mercury {
    from { transform: scaleY(0.25); }
    to { transform: none; }
  }

  @keyframes kp-gfx-drop {
    0% { transform: translateY(-56px); opacity: 0; }
    40% { transform: none; opacity: 1; }
    50% { transform: scale(1.12, 0.78); }
    65% { transform: translateY(-10px) scale(0.96, 1.06); }
    80% { transform: scale(1.04, 0.94); }
    100% { transform: none; opacity: 1; }
  }

  @keyframes kp-gfx-flip {
    0%, 50%, 100% { transform: none; }
    25%, 75% { transform: scaleX(-1); }
  }

  @keyframes kp-gfx-fill {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.18); opacity: 1; }
    100% { transform: none; opacity: 1; }
  }

  @keyframes kp-gfx-check {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
  }

  @keyframes kp-gfx-drive {
    0%, 100% { transform: none; }
    25% { transform: translateX(-26px); }
    75% { transform: translateX(28px); }
  }

  @keyframes kp-gfx-bounce {
    0%, 100% { transform: none; }
    50% { transform: translateY(-3px); }
  }

  @keyframes kp-gfx-puff {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: translate(-14px, -4px) scale(1.4); opacity: 0; }
  }

  @keyframes kp-gfx-wave {
    0%, 100% { transform: none; }
    25% { transform: skewY(-12deg) scaleX(0.92); }
    75% { transform: skewY(8deg); }
  }

  @keyframes kp-gfx-hop {
    0%, 100% { transform: none; }
    30% { transform: translateY(-12px); }
    50% { transform: scale(1.06, 0.92); }
    70% { transform: translateY(-3px); }
  }
}
/*
 * An article (KID-1324, the canvas's ArticleB board): the blog's articles, and the gear reviews, News items, pages
 * and help articles that share its prose. The head, the wide image, the prose set for long reading, the callout,
 * the aside with the contents and the app's card, Share, Free tools, the app band and Keep reading.
 */

@layer components {
  .kp-article__container {
    max-width: calc(68rem + 2 * var(--kp-gutter));
    padding-block-start: clamp(1rem, 0.6rem + 1.5vw, 2rem);
  }

  /* An article that ends the page (a page, a help article, a News item, gear review or post with no band or more
     to read after it) keeps a section's space above the footer */
  .kp-article:last-child {
    padding-block-end: var(--kp-section);
  }

  .kp-article__head {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    max-width: 51.25rem;
    padding-block: var(--kp-space-6) clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  }

  .kp-article__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-2);
  }

  .kp-article__app {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-2);
    margin-inline-end: 0.375rem;
    text-decoration: none;
  }

  .kp-article__app .kp-eyebrow {
    font-size: 0.75rem;
    letter-spacing: var(--kp-label-tracking);
  }

  .kp-article__topic {
    padding: 0.375rem 0.75rem;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-alt);
    color: var(--kp-ink);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
  }

  .kp-article__topic:hover {
    background: var(--kp-alt-2);
    color: var(--kp-ink);
  }

  .kp-article__head h1 {
    font-size: clamp(2.25rem, 1.75rem + 2.1vw, 3.625rem);
    line-height: calc(var(--kp-display-leading) - 0.01);
    letter-spacing: var(--kp-display-tracking-tight);
  }

  .kp-article__dek {
    color: var(--kp-ink-2);
    font-size: var(--kp-text-lead);
    line-height: var(--kp-body-leading);
  }

  .kp-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-3);
    color: var(--kp-muted);
    font-size: 0.9375rem;
  }

  .kp-article__actions,
  .kp-share {
    display: inline-flex;
    gap: var(--kp-space-2);
  }

  .kp-share__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--kp-target);
    padding: 0 var(--kp-space-4);
    border: 1px solid var(--kp-border-2);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-card);
    color: var(--kp-ink);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--kp-duration) var(--kp-ease);
  }

  .kp-share__button:hover {
    background: var(--kp-alt);
    color: var(--kp-ink);
  }

  .kp-share__button--icon {
    width: var(--kp-target);
    padding: 0;
  }

  .kp-article__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    background: var(--kp-alt);
  }

  /* The body in a 720 px column, with the aside beside it on desktop */
  .kp-article__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4.5rem;
    align-items: start;
    padding-block-start: clamp(1.75rem, 1.1rem + 2.6vw, 3.5rem);
  }

  @media (min-width: 64rem) {
    .kp-article__layout--aside {
      grid-template-columns: minmax(0, 45rem) 18.75rem;
      justify-content: space-between;
    }
  }

  .kp-article__main {
    min-width: 0;
    max-width: 45rem;
  }

  .kp-article__aside {
    display: none;
  }

  @media (min-width: 64rem) {
    .kp-article__aside {
      position: sticky;
      inset-block-start: var(--kp-space-6);
      display: flex;
      flex-direction: column;
      gap: var(--kp-space-5);
      max-height: calc(100vh - 2 * var(--kp-space-6));
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    .kp-article__toc-phone {
      display: none;
    }
  }

  .kp-toc {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kp-toc a {
    color: var(--kp-ink-2);
    font-weight: 600;
    text-decoration: none;
  }

  .kp-toc a:hover {
    color: var(--kp-head);
    text-decoration: underline;
  }

  .kp-article__toc {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
  }

  .kp-article__toc .kp-toc {
    gap: var(--kp-space-3);
    border-inline-start: 2px solid var(--kp-border);
    font-size: 0.9375rem;
    line-height: 1.4;
  }

  .kp-article__toc li {
    margin-inline-start: -2px;
    padding-inline-start: var(--kp-space-4);
    border-inline-start: 2px solid transparent;
  }

  .kp-article__toc li:has([aria-current]) {
    border-color: var(--kp-head);
  }

  .kp-article__toc [aria-current] {
    color: var(--kp-head);
    font-weight: 800;
  }

  .kp-article__toc-phone {
    margin-block-end: var(--kp-space-7);
    padding: var(--kp-space-1) 1.125rem;
    border-radius: var(--kp-radius-md);
    background: var(--kp-alt);
  }

  .kp-article__toc-phone summary {
    display: flex;
    align-items: center;
    min-height: 3rem;
    color: var(--kp-head);
    font-weight: 800;
    cursor: pointer;
  }

  .kp-article__toc-phone .kp-toc {
    gap: 0.625rem;
    padding: 0 0 var(--kp-space-4) 1.25rem;
    list-style: decimal;
  }

  .kp-article__app-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--kp-space-3);
    padding: 1.375rem;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
  }

  .kp-article__app-card-head {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
  }

  .kp-article__app-card-head > span {
    display: flex;
    flex-direction: column;
  }

  .kp-article__app-card-head strong {
    font-family: var(--kp-font-display);
    font-size: 1.125rem;
    font-weight: 900;
  }

  .kp-article__app-card-head span span {
    color: var(--kp-muted);
    font-size: 0.8125rem;
  }

  .kp-article__app-card p {
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .kp-article__app-card .kp-button {
    min-height: var(--kp-target);
    padding-block: 0.75rem;
    font-size: 0.9375rem;
  }

  /* The prose: 19 px and 1.7 on desktop, 17 px on phones */
  .kp-prose {
    color: var(--kp-ink-2);
    font-size: 1.0625rem;
    line-height: 1.7;
    overflow-wrap: break-word;
  }

  @media (min-width: 40rem) {
    .kp-prose {
      font-size: 1.1875rem;
    }
  }

  :is(:lang(ja), :lang(ko), :lang(zh), :lang(hi)) .kp-prose {
    line-height: 1.85;
  }

  .kp-prose > * {
    margin: 0;
  }

  .kp-prose > * + * {
    margin-block-start: 1.1em;
  }

  .kp-prose > p:first-child {
    color: var(--kp-ink);
    font-size: 1.12em;
  }

  .kp-prose h2 {
    margin-block-start: 1.9em;
    color: var(--kp-head);
    font-size: clamp(1.5rem, 1.3rem + 0.85vw, 1.875rem);
    line-height: var(--kp-heading-leading, 1.2);
    letter-spacing: -0.01em;
    scroll-margin-block-start: var(--kp-space-6);
  }

  .kp-prose h3,
  .kp-prose h4 {
    margin-block-start: 1.6em;
    color: var(--kp-ink);
    font-size: 1.15em;
    font-weight: 800;
    line-height: var(--kp-title-leading, 1.3);
  }

  .kp-prose :is(h2, h3, h4) + * {
    margin-block-start: 0.7em;
  }

  .kp-prose strong {
    color: var(--kp-ink);
  }

  .kp-prose a {
    font-weight: 700;
  }

  .kp-prose ul {
    padding: 0;
    list-style: none;
  }

  .kp-prose ul > li {
    position: relative;
    padding-inline-start: 1.5em;
  }

  .kp-prose li + li {
    margin-block-start: 0.55em;
  }

  .kp-prose ul > li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0.2em;
    inset-block-start: 0.62em;
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: var(--kp-dot);
  }

  /* An ordered list is a numbered card (the "Quick action plan") */
  .kp-prose ol {
    padding: clamp(1.125rem, 0.9rem + 0.9vw, 1.625rem);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
    list-style: none;
    counter-reset: kp-step;
  }

  .kp-prose ol > li {
    position: relative;
    min-height: 1.9em;
    padding-inline-start: 2.6em;
    counter-increment: kp-step;
  }

  .kp-prose ol > li + li {
    margin-block-start: 0.8em;
  }

  .kp-prose ol > li::before {
    content: counter(kp-step);
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.8em;
    height: 1.8em;
    border-radius: 50%;
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
    font-family: var(--kp-font-display);
    font-size: 0.9em;
    font-weight: 900;
    line-height: 1;
  }

  .kp-prose li > :is(ul, ol) {
    margin-block-start: 0.55em;
  }

  .kp-prose li > ol {
    padding: 0;
    background: none;
  }

  .kp-prose blockquote {
    padding: 1.1em 1.25em;
    border-inline-start: 4px solid var(--kp-yellow);
    border-radius: 0 var(--kp-radius-md) var(--kp-radius-md) 0;
    background: var(--kp-alt);
    color: var(--kp-ink);
  }

  .kp-prose blockquote > * + * {
    margin-block-start: 0.8em;
  }

  .kp-prose hr {
    height: 1px;
    border: 0;
    background: var(--kp-border);
  }

  .kp-prose img {
    border-radius: var(--kp-radius-md);
  }

  .kp-prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.85em;
    line-height: 1.5;
  }

  .kp-prose :is(th, td) {
    padding: 0.6em 0.8em;
    border-block-end: 1px solid var(--kp-border);
    text-align: start;
    vertical-align: top;
  }

  .kp-prose th {
    color: var(--kp-ink);
    font-weight: 800;
  }

  .kp-prose code {
    padding: 0.1em 0.35em;
    border-radius: 0.35em;
    background: var(--kp-alt);
    font-size: 0.9em;
  }

  /* The disclaimer: a quiet note */
  .kp-prose .kp-note {
    padding-block-start: 1.2em;
    border-block-start: 1px solid var(--kp-border);
    color: var(--kp-muted);
    font-size: 0.82em;
    line-height: 1.6;
  }

  .kp-prose .kp-note strong {
    color: var(--kp-ink-2);
  }

  .kp-prose .kp-note__title {
    margin-block-start: 1.6em;
    color: var(--kp-muted);
    font-family: var(--kp-font-body);
    font-size: 0.82em;
    font-weight: 800;
  }

  .kp-prose .kp-note__title + .kp-note {
    margin-block-start: 0.4em;
    padding-block-start: 0;
    border: 0;
  }

  .kp-prose hr + .kp-note {
    padding-block-start: 0;
    border: 0;
  }

  /* The app's callout inside the body */
  .kp-prose .kp-callout {
    display: flex;
    align-items: flex-start;
    gap: var(--kp-space-4);
    margin-block-start: 1.6em;
    padding: clamp(1.125rem, 0.9rem + 0.9vw, 1.625rem);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
  }

  .kp-callout__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--kp-space-2);
    min-width: 0;
    font-size: 1rem;
    line-height: var(--kp-body-leading);
  }

  .kp-callout__title {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.25;
  }

  .kp-prose .kp-callout + * {
    margin-block-start: 1.6em;
  }

  .kp-callout .kp-cta {
    margin-block-start: var(--kp-space-1);
  }

  .kp-article__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    margin-block-start: var(--kp-space-8);
    padding-block-start: var(--kp-space-6);
    border-block-start: 1px solid var(--kp-border);
  }

  .kp-article__share strong {
    margin-inline-end: 0.375rem;
    font-size: 0.9375rem;
  }

  .kp-article__tools {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-5);
    max-width: 45rem;
    padding-block-start: clamp(3.5rem, 2.8rem + 2.9vw, 5.5rem);
  }

  .kp-article__tools h2 {
    font-size: 1.75rem;
  }

  .kp-article__tool-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
  }

  @media (min-width: 40rem) {
    .kp-article__tool-cards {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .kp-article + .kp-band-section {
    padding-block: clamp(3.5rem, 2.8rem + 2.9vw, 5.5rem) 0;
  }

  .kp-band-section + .kp-article__more {
    padding-block-start: clamp(3.5rem, 2.8rem + 2.9vw, 5.5rem);
  }

  .kp-band-section .kp-container,
  .kp-article__more .kp-container {
    max-width: calc(68rem + 2 * var(--kp-gutter));
  }

  /* The app band: the words and badges beside the app's screen, cut off at the bottom */
  .kp-app-band {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--kp-space-8);
    overflow: hidden;
    padding: 1.75rem 1.375rem;
    border-radius: var(--kp-radius-xl);
    background: var(--kp-band);
    color: #ffffff;
  }

  .kp-app-band__text {
    display: flex;
    flex: 1 1 23.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    min-width: 0;
  }

  .kp-app-band__app {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    font-family: var(--kp-font-display);
    font-size: 1.25rem;
    font-weight: 900;
  }

  .kp-app-band h2 {
    color: #ffffff;
    font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
    line-height: var(--kp-display-leading);
  }

  .kp-app-band__lead {
    color: #e4e0f5;
    font-size: 1.125rem;
    line-height: var(--kp-reading-leading);
  }

  .kp-app-band .kp-rating-chip,
  .kp-app-band .kp-qr {
    color: #e4e0f5;
  }

  .kp-app-band .kp-rating-chip strong {
    color: #ffffff;
  }

  .kp-app-band .kp-store-badges {
    margin-block-start: 0.375rem;
  }

  .kp-app-band__screen {
    display: none;
  }

  @media (min-width: 64rem) {
    .kp-app-band {
      padding: 3rem 0 0 3rem;
    }

    .kp-app-band__text {
      padding-block-end: 3rem;
    }

    .kp-app-band__screen {
      display: flex;
      align-self: flex-end;
      margin-inline-end: var(--kp-space-6);
    }

    .kp-app-band__screen .kp-device {
      --kp-device-width: 16.25rem;
      --kp-device-height: 21.25rem;
    }

    .kp-app-band--apps {
      align-items: center;
      padding: 3rem;
    }

    .kp-app-band--apps .kp-app-band__text {
      padding: 0;
    }
  }

  .kp-app-band__apps {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kp-space-3);
  }

  .kp-app-band__link {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-2);
    min-height: var(--kp-target);
    padding: 0.375rem 1rem 0.375rem 0.375rem;
    border-radius: var(--kp-radius-pill);
    background: rgb(255 255 255 / 0.12);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
  }

  .kp-app-band__link:hover {
    background: rgb(255 255 255 / 0.2);
    color: #ffffff;
  }

  .kp-article__more .kp-section-head h2 {
    font-size: clamp(1.75rem, 1.5rem + 0.95vw, 2.25rem);
  }

  /* A gear review's and a News item's image keep their own shape (a product shot, a banner), never cropped: the page
     gives its width and aspect-ratio inline from the image's size, so its place is held before it loads */
  .kp-article__image--product,
  .kp-article__image--news {
    max-width: 100%;
    max-height: 37.5rem;
    object-fit: contain;
  }

  .kp-gear__buy {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    margin-block-end: var(--kp-space-8);
  }

  .kp-gear__buy .kp-button {
    gap: var(--kp-space-3);
  }

  .kp-gear__disclosure {
    color: var(--kp-muted);
    font-size: 0.875rem;
  }

  .kp-gear__verdict {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
    margin-block-end: var(--kp-space-8);
  }

  @media (min-width: 40rem) {
    .kp-gear__verdict {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .kp-gear__card {
    padding: clamp(1.125rem, 0.9rem + 0.9vw, 1.625rem);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
    font-size: 1rem;
  }

  .kp-prose.kp-gear__card h2 {
    margin: 0;
    font-size: 1.25rem;
  }

  /* The help center (KID-1337): a list of questions with their answers, and the article */
  .kp-help-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-3);
  }

  @media (min-width: 48rem) {
    .kp-help-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .kp-help-card {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    height: 100%;
    padding: var(--kp-space-5) var(--kp-space-6);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
    color: var(--kp-ink);
    text-decoration: none;
    transition: background-color var(--kp-duration) var(--kp-ease);
  }

  .kp-help-card:hover {
    background: var(--kp-alt-2);
    color: var(--kp-ink);
  }

  .kp-help-card .kp-eyebrow {
    font-size: 0.75rem;
  }

  .kp-help-card__title {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.1875rem;
    font-weight: 800;
    line-height: var(--kp-title-leading);
  }

  .kp-help-card__text {
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
    line-height: var(--kp-body-leading);
  }

  .kp-help-video {
    position: relative;
    margin-block-end: var(--kp-space-8);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
  }

  .kp-help-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }

  .kp-help-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-4);
    margin-block-start: var(--kp-space-8);
    padding: var(--kp-space-6);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
  }

  .kp-help-contact > span {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-1);
  }

  .kp-help-contact strong {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.25rem;
    font-weight: 900;
  }

  .kp-help-contact span span {
    color: var(--kp-ink-2);
  }
}
/*
 * The assistant demo (KID-1339, the canvas's AssistantDemo board): the sample family's log beside a chat with the
 * app's assistant, on the home page and the app sites. The chat area keeps its height whatever it holds, so the page
 * does not move when the static example turns into the live chat.
 */

@layer components {
  .kp-demo {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-6);
    min-width: 0;
    padding: var(--kp-space-5);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
    color: var(--kp-ink);
  }

  .kp-demo__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--kp-space-5);
  }

  .kp-demo__intro {
    display: flex;
    flex: 1 1 26rem;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--kp-space-2);
    min-width: 0;
  }

  .kp-demo__title {
    color: var(--kp-head);
    font-size: clamp(1.625rem, 1.4393rem + 0.7619vw, 2rem);
    line-height: 1.1;
  }

  .kp-demo__intro p {
    color: var(--kp-ink-2);
    line-height: var(--kp-body-leading);
  }

  .kp-demo__apps {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kp-space-2);
  }

  .kp-demo__app {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    padding: var(--kp-space-1);
    border: 3px solid transparent;
    border-radius: 1rem;
    background: var(--kp-card);
    cursor: pointer;
    transition: border-color var(--kp-duration) var(--kp-ease);
  }

  .kp-demo__app img {
    width: 2.375rem;
    height: 2.375rem;
  }

  .kp-demo__app[aria-pressed="true"] {
    border-color: var(--kp-focus);
  }

  .kp-demo__panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
    align-items: stretch;
  }

  @media (min-width: 48rem) {
    .kp-demo {
      padding: var(--kp-space-7);
    }

    .kp-demo__panels {
      grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    }

    .kp-demo__chat {
      height: 33rem;
    }
  }

  .kp-demo__log,
  .kp-demo__chat {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--kp-space-5);
    border-radius: 1.375rem;
    background: var(--kp-card);
  }

  .kp-demo__log {
    gap: 0.375rem;
  }

  /* A fixed height: the messages take what the suggested questions leave, so the box never changes size as they go */
  .kp-demo__chat {
    gap: 0.875rem;
    height: 34rem;
  }

  .kp-demo__log-head,
  .kp-demo__chat-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }

  .kp-demo__log-head {
    padding-block-end: var(--kp-space-2);
  }

  .kp-demo__chat-head {
    gap: var(--kp-space-3);
    padding-block-end: 0.875rem;
    border-block-end: 1px solid var(--kp-border);
  }

  .kp-demo__log-head > span,
  .kp-demo__chat-head > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .kp-demo__log-head strong,
  .kp-demo__chat-head strong {
    font-family: var(--kp-font-display);
    font-size: 1.0625rem;
    font-weight: var(--kp-display-weight);
    line-height: var(--kp-ui-leading);
  }

  .kp-demo__log-head span span,
  .kp-demo__chat-head span span {
    color: var(--kp-muted);
    font-size: var(--kp-text-caption);
  }

  .kp-demo__chat-head img {
    flex-shrink: 0;
  }

  .kp-demo__rows {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kp-demo__row {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    padding: 0.625rem;
    border-radius: var(--kp-radius-sm);
  }

  .kp-demo__row--new {
    background: var(--kp-alt);
  }

  .kp-demo__initial {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50%;
    background: var(--kp-person-lavender);
    color: var(--kp-person-ink);
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1;
  }

  .kp-demo__initial--teal { background: var(--kp-person-teal); }
  .kp-demo__initial--yellow { background: var(--kp-person-yellow); }
  .kp-demo__initial--lilac { background: var(--kp-person-lilac); }
  .kp-demo__initial--orange { background: var(--kp-person-orange); }

  .kp-demo__what {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
  }

  .kp-demo__what strong {
    font-size: 0.9375rem;
    line-height: var(--kp-ui-leading);
  }

  .kp-demo__what span,
  .kp-demo__when {
    color: var(--kp-muted);
    font-size: var(--kp-text-caption);
  }

  .kp-demo__when {
    white-space: nowrap;
  }

  .kp-demo__row--new .kp-demo__when {
    color: var(--kp-brand);
    font-weight: 800;
  }

  .kp-demo__note {
    margin-block-start: auto;
    padding-block-start: 0.625rem;
    color: var(--kp-muted);
    font-size: var(--kp-text-caption);
  }

  .kp-demo__messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.625rem;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .kp-demo__messages:focus {
    outline: none;
  }

  .kp-demo__empty {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-block-start: auto;
  }

  .kp-demo__empty strong {
    font-family: var(--kp-font-display);
    font-size: 1.125rem;
    font-weight: var(--kp-display-weight);
    line-height: var(--kp-heading-leading);
  }

  .kp-demo__empty span {
    color: var(--kp-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .kp-demo__message {
    display: flex;
    align-items: flex-end;
    gap: var(--kp-space-2);
  }

  /* The first message of a conversation sits at the bottom, as in the apps, until the chat fills up */
  .kp-demo__message:first-child {
    margin-block-start: auto;
  }

  .kp-demo__message p {
    max-width: 82%;
    margin: 0;
    padding: 0.6875rem 0.9375rem;
    border-radius: 1.25rem 1.25rem 1.25rem 0.375rem;
    background: var(--kp-alt);
    font-size: 0.9375rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .kp-demo__message strong {
    font-weight: 800;
  }

  .kp-demo__message a {
    display: block;
    margin-block-start: 0.375rem;
    color: var(--kp-brand);
    font-weight: 800;
  }

  .kp-demo__message--mine {
    justify-content: flex-end;
  }

  .kp-demo__message--mine p {
    border-radius: 1.25rem 1.25rem 0.375rem 1.25rem;
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
  }

  .kp-demo__avatar {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
  }

  /* The avatar sits beside the last reply in a run, as in the apps; the earlier ones keep its space */
  .kp-demo__message:has(+ .kp-demo__message:not(.kp-demo__message--mine)) .kp-demo__avatar,
  .kp-demo__message:has(+ .kp-demo__typing) .kp-demo__avatar {
    visibility: hidden;
  }

  .kp-demo__typing {
    display: flex;
    align-items: flex-end;
    gap: var(--kp-space-2);
  }

  .kp-demo__typing:first-child {
    margin-block-start: auto;
  }

  .kp-demo__dots {
    display: flex;
    gap: 0.3125rem;
    padding: 0.875rem 1rem;
    border-radius: 1.25rem 1.25rem 1.25rem 0.375rem;
    background: var(--kp-alt);
  }

  .kp-demo__dots span {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: var(--kp-muted);
    animation: kp-demo-dot 1s var(--kp-ease) infinite;
  }

  .kp-demo__dots span:nth-child(2) { animation-delay: 150ms; }
  .kp-demo__dots span:nth-child(3) { animation-delay: 300ms; }

  @keyframes kp-demo-dot {
    0%, 60%, 100% { opacity: 0.35; }
    30% { opacity: 1; }
  }

  @media (prefers-reduced-motion: reduce) {
    .kp-demo__dots span {
      animation: none;
    }
  }

  .kp-demo__card {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-self: flex-start;
    gap: var(--kp-space-3);
    width: 100%;
    max-width: 21.25rem;
    padding: 0.875rem;
    border: 1px solid var(--kp-border-2);
    border-radius: 1.125rem;
  }

  .kp-demo__card-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }

  .kp-demo__card-head > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .kp-demo__card-head strong {
    font-size: 0.9375rem;
  }

  .kp-demo__card-head span span {
    color: var(--kp-muted);
    font-size: var(--kp-text-caption);
  }

  .kp-demo__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kp-space-2);
  }

  .kp-demo__actions .kp-button {
    min-height: var(--kp-target);
    padding-block: 0.625rem;
  }

  .kp-demo__done {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: var(--kp-space-3);
    padding: var(--kp-space-4);
    border-radius: 1.125rem;
    background: var(--kp-alt);
  }

  .kp-demo__done strong {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.125rem;
    font-weight: var(--kp-display-weight);
  }

  .kp-demo__done p {
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .kp-demo__chips {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: var(--kp-space-2);
  }

  .kp-demo__chip {
    min-height: var(--kp-target);
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--kp-border-2);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-card);
    color: var(--kp-brand);
    font-family: var(--kp-font-body);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: var(--kp-ui-leading);
    text-align: start;
    cursor: pointer;
    transition: background-color var(--kp-duration) var(--kp-ease);
  }

  .kp-demo__chip:hover {
    background: var(--kp-alt);
  }

  /* On a phone the suggested questions are one row that scrolls sideways, leaving the chat its room */
  @media (max-width: 47.99rem) {
    .kp-demo__chips {
      flex-wrap: nowrap;
      margin-inline: calc(-1 * var(--kp-space-5));
      padding-inline: var(--kp-space-5);
      overflow-x: auto;
      scroll-padding-inline: var(--kp-space-5);
      scrollbar-width: none;
    }

    .kp-demo__chips::-webkit-scrollbar {
      display: none;
    }

    .kp-demo__chip {
      flex-shrink: 0;
      white-space: nowrap;
    }
  }

  .kp-demo__form {
    display: flex;
    align-items: center;
    gap: var(--kp-space-2);
  }

  .kp-demo__form input {
    flex: 1 1 auto;
    min-width: 0;
    height: 3rem;
    padding: 0 1.125rem;
    border: 1px solid var(--kp-border-2);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-card);
    color: var(--kp-ink);
    font: inherit;
    font-size: 1rem;
  }

  .kp-demo__form input::placeholder {
    color: var(--kp-muted);
  }

  .kp-demo__form input:disabled {
    opacity: 0.6;
  }

  .kp-demo__form .kp-icon-button {
    width: 3rem;
    height: 3rem;
  }

  .kp-demo__footnote {
    color: var(--kp-muted);
    font-size: 0.75rem;
  }
}
/* Buttons, icon buttons, text links and labels (components board: Buttons, Badges and labels). */

@layer components {
  .kp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-2);
    min-height: 3rem;
    padding: 0.8125rem 1.25rem;
    border: 0;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
    font-family: var(--kp-font-body);
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: var(--kp-ui-leading);
    text-align: center;
    text-decoration: none;
    transition: background-color var(--kp-duration) var(--kp-ease), color var(--kp-duration) var(--kp-ease),
      transform var(--kp-duration) var(--kp-ease);
  }

  .kp-button:hover {
    background: var(--kp-btn-hover);
    color: var(--kp-btn-ink);
  }

  .kp-button:active {
    background: var(--kp-btn-active);
    transform: translateY(1px);
  }

  .kp-button:disabled,
  .kp-button[aria-disabled="true"] {
    background: var(--kp-purple-4);
    color: #ffffff;
    cursor: not-allowed;
    transform: none;
  }

  .kp-button--large {
    min-height: 3.5rem;
    padding: 1rem 1.625rem;
    font-size: 1.0625rem;
  }

  .kp-button--secondary {
    background: var(--kp-btn-2-bg);
    color: var(--kp-brand);
  }

  .kp-button--secondary:hover {
    background: var(--kp-btn-2-hover);
    color: var(--kp-brand);
  }

  .kp-button--secondary:active {
    background: var(--kp-btn-2-active);
  }

  .kp-button--secondary:disabled,
  .kp-button--secondary[aria-disabled="true"] {
    background: var(--kp-btn-2-bg);
    color: var(--kp-disabled);
  }

  .kp-button--outline {
    padding-block: 0.75rem;
    padding-inline: 1.1875rem;
    border: 1px solid var(--kp-border-2);
    background: var(--kp-card);
    color: var(--kp-brand);
  }

  .kp-button--outline:hover {
    background: var(--kp-btn-2-bg);
    color: var(--kp-brand);
  }

  .kp-button--block {
    display: flex;
    width: 100%;
  }

  /* On the purple band, yellow is the action and the focus ring turns yellow. */
  .kp-on-band {
    --kp-focus: var(--kp-yellow);
  }

  .kp-on-band .kp-button {
    background: var(--kp-yellow);
    color: var(--kp-night);
  }

  .kp-on-band .kp-button:hover {
    background: #ffd83d;
  }

  .kp-on-band .kp-button--secondary {
    background: rgb(255 255 255 / 0.12);
    color: #ffffff;
  }

  .kp-on-band .kp-button--secondary:hover {
    background: rgb(255 255 255 / 0.2);
  }

  /* Round icon buttons: the rail's previous and next, the menu. */
  .kp-icon-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: var(--kp-target);
    height: var(--kp-target);
    padding: 0;
    border: 0;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-alt);
    color: var(--kp-ink);
    transition: background-color var(--kp-duration) var(--kp-ease), opacity var(--kp-duration) var(--kp-ease);
  }

  .kp-icon-button:hover {
    background: var(--kp-alt-2);
  }

  .kp-icon-button--large {
    width: 3.25rem;
    height: 3.25rem;
  }

  .kp-icon-button--primary {
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
  }

  .kp-icon-button--primary:hover {
    background: var(--kp-btn-hover);
  }

  .kp-icon-button:disabled {
    border: 1px solid var(--kp-border-2);
    background: var(--kp-card);
    color: var(--kp-muted);
    opacity: 0.45;
    cursor: default;
  }

  /* "All articles →": a call to action, underlined only on hover. */
  .kp-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--kp-brand);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 4px;
  }

  .kp-cta:hover {
    color: var(--kp-link-hover);
    text-decoration: underline;
  }

  .kp-cta::after {
    content: "→";
  }

  @media (pointer: coarse) {
    .kp-cta {
      min-height: var(--kp-target);
      margin-block: calc((var(--kp-target) - 1.5em) / -2);
    }
  }

  /* Labels: yellow badges are news (a status, a first place, something new), at most one per card. */
  .kp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-yellow);
    color: var(--kp-night);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: var(--kp-ui-leading);
    letter-spacing: var(--kp-label-tracking);
    text-transform: var(--kp-eyebrow-case);
    white-space: nowrap;
  }

  /* A section's label stands alone, so in a long language it wraps rather than run past the screen's edge */
  .kp-badge--large {
    max-width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    text-align: center;
    white-space: normal;
    text-wrap: balance;
  }

  .kp-badge--small {
    padding: 0.125rem 0.4375rem;
    font-size: 0.6875rem;
    letter-spacing: calc(var(--kp-label-tracking) / 3);
  }

  .kp-badge--premium {
    padding-inline-start: 0.5rem;
    background: var(--kp-purple);
    color: #ffffff;
  }

  .kp-badge--premium svg {
    fill: var(--kp-yellow);
  }

  .kp-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-alt);
    color: var(--kp-ink);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: var(--kp-ui-leading);
  }

  .kp-eyebrow {
    color: var(--kp-brand-2);
    font-size: var(--kp-text-eyebrow);
    font-weight: 800;
    line-height: var(--kp-ui-leading);
    letter-spacing: var(--kp-eyebrow-tracking);
    text-transform: var(--kp-eyebrow-case);
  }

  /* An app's mark beside its name: the yellow tile is in the image, so it needs no shape of its own. */
  .kp-mark {
    flex-shrink: 0;
  }
}
/*
 * Cards (components board: Review cards, Device frames, Feature tiles, App card). Cards are flat: they stand apart
 * by surface (white on lavender, lavender on white), never by shadow.
 */

@layer components {
  /* Review card: the store review exactly as written, with its stars, store, country and month. */
  .kp-review {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin: 0;
    padding: 1.625rem;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-card);
  }

  .kp-review blockquote {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: var(--kp-space-2);
  }

  .kp-review__title {
    font-family: var(--kp-font-display);
    font-size: var(--kp-text-title);
    font-weight: 800;
    line-height: var(--kp-title-leading);
  }

  .kp-review__body {
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
    line-height: var(--kp-reading-leading);
  }

  .kp-review__more {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--kp-brand);
    font-size: 0.9375rem;
    font-weight: 800;
    border-radius: 4px;
  }

  .kp-review__more:hover {
    text-decoration: underline;
  }

  /* On touch screens the text controls are 44 px targets (the style tile's minimum), with the text where it was. */
  @media (pointer: coarse) {
    .kp-review__more {
      min-height: var(--kp-target);
      margin-block: calc((var(--kp-target) - 1.5em) / -2);
    }
  }

  .kp-review figcaption {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--kp-muted);
    font-size: 0.875rem;
  }

  .kp-review figcaption .kp-mark {
    flex-shrink: 0;
    border-radius: 0.4375rem;
  }

  .kp-review figcaption strong {
    color: var(--kp-ink);
  }

  .kp-reviews {
    padding: var(--kp-space-6);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
  }

  /* Device frames: CSS, so the screenshot inside is the raw simulator image in the visitor's language. */
  .kp-device {
    --kp-device-width: 12.5rem;
    width: var(--kp-device-width);
    max-width: 100%;
    padding: 0.375rem;
    border-radius: 2.125rem;
    background: var(--kp-bezel);
    /* In dark mode the night bezel would melt into the dark surface, so it gets a hairline. */
    box-shadow: 0 0 0 1px var(--kp-bezel-ring);
  }

  .kp-device img {
    width: 100%;
    border-radius: 1.75rem;
  }

  .kp-device--cropped {
    height: var(--kp-device-height, 20.625rem);
    padding-block-end: 0;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
    overflow: hidden;
  }

  .kp-device--cropped img {
    border-end-start-radius: 0;
    border-end-end-radius: 0;
  }

  /* A tablet: a wider frame with tighter corners, for an iPad screenshot */
  .kp-device--tablet {
    --kp-device-width: 22.5rem;
    padding: 0.5rem;
    border-radius: 1.5rem;
  }

  .kp-device--tablet img {
    border-radius: 1rem;
  }

  .kp-device--watch {
    --kp-device-width: 9.75rem;
    position: relative;
    padding: 0.625rem;
    border-radius: 2.875rem;
  }

  .kp-device--watch .kp-device__screen {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 416 / 496;
    border-radius: 2.25rem;
    background: var(--kp-bezel);
    overflow: hidden;
  }

  /* The capture fills the screen, so a watch of another shape (an Ultra's 422 x 514) loses a sliver, never a gap */
  .kp-device--watch .kp-device__screen img:not(.kp-mark) {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
  }

  /* A watch standing on its tile's bottom edge, cut off below its screen: the home page's "On your wrist" and a
     feature tile with a watch screen (KID-1356). The tile has no bottom padding and clips it. */
  .kp-watch-stand {
    display: flex;
    justify-content: center;
    margin-block-start: auto;
    padding-block-start: var(--kp-space-4);
  }

  .kp-watch-stand .kp-device--watch {
    margin-block-end: -2.5rem;
  }

  .kp-device--watch::before,
  .kp-device--watch::after {
    content: "";
    position: absolute;
    inset-inline-end: -0.4375rem;
    width: 0.5rem;
    border-radius: 0 0.375rem 0.375rem 0;
    background: var(--kp-bezel);
  }

  .kp-device--watch::before {
    inset-block-start: 2.875rem;
    height: 1.875rem;
  }

  .kp-device--watch::after {
    inset-block-start: 6rem;
    height: 1.625rem;
    inset-inline-end: -0.3125rem;
    width: 0.375rem;
  }

  .kp-device--round {
    --kp-device-width: 10.625rem;
    position: relative;
    padding: 0.625rem;
    border-radius: 50%;
  }

  .kp-device--round .kp-device__screen {
    aspect-ratio: 1;
    border-radius: 50%;
  }

  .kp-device--round::after {
    content: "";
    position: absolute;
    inset-block-start: 3.875rem;
    inset-inline-end: -0.375rem;
    width: 0.5rem;
    height: 1.5rem;
    border-radius: 0 0.3125rem 0.3125rem 0;
    background: var(--kp-bezel);
  }

  .kp-device__screen {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
    color: #8b80c9;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: var(--kp-ui-leading);
    text-align: center;
  }

  .kp-device__screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  /* Feature tiles: small (one column) or wide (two, with a cropped phone). */
  .kp-tiles {
    container-type: inline-size;
  }

  .kp-tiles__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
  }

  /* A wide tile spans two columns wherever there are two or more, so its text never squeezes beside the phone. */
  @container (min-width: 40rem) {
    .kp-tiles__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kp-tile--wide {
      grid-column: span 2;
    }
  }

  @container (min-width: 64rem) {
    .kp-tiles__grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  .kp-tile {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: var(--kp-space-7);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
  }

  .kp-tile h3 {
    font-size: var(--kp-text-h3);
    line-height: var(--kp-heading-leading);
  }

  .kp-tile p {
    color: var(--kp-ink-2);
    font-size: 1rem;
    line-height: var(--kp-body-leading);
  }

  .kp-tile__labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-2);
  }

  .kp-tile .kp-eyebrow {
    font-size: 0.8125rem;
    letter-spacing: var(--kp-label-tracking);
  }

  .kp-tile--wide,
  .kp-tile--watch {
    padding-block-end: 0;
    overflow: hidden;
  }

  .kp-tile--wide {
    flex-direction: column;
    gap: var(--kp-space-5);
  }

  .kp-tile__text {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .kp-tile--wide > .kp-device {
    --kp-device-width: 11.875rem;
    --kp-device-height: 15rem;
    align-self: center;
    margin-block-start: auto;
  }

  @container (min-width: 40rem) {
    .kp-tile--wide {
      flex-direction: row;
      min-height: 21.25rem;
    }

    .kp-tile--wide .kp-tile__text {
      flex: 1 1 0;
      min-width: 0;
      padding-block-end: var(--kp-space-7);
    }

    .kp-tile--wide > .kp-device {
      flex: 0 0 auto;
      align-self: flex-end;
      --kp-device-height: auto;
    }

    .kp-tile--wide .kp-watch-stand {
      flex: 0 0 auto;
      padding-inline: var(--kp-space-5);
    }
  }

  /* App card: the whole card is one link; the graphic is the only place an app's accent appears. */
  .kp-app-card {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    color: var(--kp-ink);
    text-decoration: none;
    border-radius: var(--kp-radius-lg);
  }

  .kp-app-card:hover {
    color: var(--kp-ink);
  }

  .kp-app-card__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18.75rem;
    padding: 1.125rem;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-app-accent, var(--kp-alt));
    transition: transform var(--kp-duration) var(--kp-ease);
  }

  .kp-app-card:hover .kp-app-card__stage {
    transform: translateY(-2px);
  }

  .kp-app-card__stage svg,
  .kp-app-card__stage img {
    width: 100%;
    height: 100%;
  }

  .kp-app-card__meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }

  .kp-app-card__meta > span {
    display: flex;
    flex-direction: column;
  }

  .kp-app-card__name {
    font-family: var(--kp-font-display);
    font-size: 1.125rem;
    font-weight: 900;
  }

  .kp-app-card__line {
    color: var(--kp-muted);
    font-size: 0.8125rem;
  }

  .kp-app-card__proof {
    margin-block-start: 0.125rem;
    font-size: 0.8125rem;
    font-weight: 700;
  }

  /* Widget and Live Activity, drawn in HTML from the page's copy. */
  .kp-widget {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 9.875rem;
    height: 9.875rem;
    flex-shrink: 0;
    padding: var(--kp-space-4);
    border-radius: 1.625rem;
    background: var(--kp-card);
    box-shadow: var(--kp-shadow-1);
  }

  .kp-widget__label {
    margin-block-start: var(--kp-space-1);
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: var(--kp-ui-leading);
  }

  .kp-widget__value {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .kp-widget__detail {
    color: var(--kp-muted);
    font-size: 0.75rem;
  }

  .kp-live-activity {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
    padding: var(--kp-space-4) var(--kp-space-5);
    border-radius: 1.5rem;
    background: var(--kp-night);
    color: #eeebf8;
  }

  .kp-live-activity__text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
  }

  .kp-live-activity__text span {
    color: #a9a3c4;
    font-size: 0.8125rem;
  }

  .kp-live-activity__timer {
    color: var(--kp-yellow);
    font-family: var(--kp-font-display);
    font-size: 1.625rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }
}
/*
 * FAQ, the waitlist form, filters, pagination, the breadcrumb and the section header (components board).
 */

@layer components {
  /* FAQ: native details, so it works without JavaScript and its answer is in the HTML. */
  .kp-faq {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .kp-faq details {
    padding-inline: var(--kp-space-6);
    border-radius: 1.375rem;
    background: var(--kp-alt);
  }

  .kp-faq summary {
    display: flex;
    align-items: center;
    gap: var(--kp-space-4);
    min-height: 4rem;
    padding-block: var(--kp-space-3);
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: var(--kp-title-leading);
    list-style: none;
    cursor: pointer;
    border-radius: 1.375rem;
  }

  .kp-faq summary::-webkit-details-marker {
    display: none;
  }

  .kp-faq summary::after {
    content: "+";
    margin-inline-start: auto;
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.625rem;
    font-weight: 900;
    line-height: 1;
  }

  .kp-faq details[open] summary::after {
    content: "–";
  }

  .kp-faq summary:focus-visible {
    outline-offset: -3px;
  }

  .kp-faq__answer {
    padding-block-end: 1.375rem;
    color: var(--kp-ink-2);
    font-size: 1rem;
    line-height: var(--kp-reading-leading);
  }

  .kp-faq__answer a {
    font-weight: 700;
  }

  /* Fields: a visible label above, never only a placeholder; the border turns purple while focused. */
  .kp-field {
    display: flex;
    flex: 1 1 15rem;
    flex-direction: column;
    gap: var(--kp-space-2);
    min-width: 0;
  }

  .kp-field label {
    font-size: 0.9375rem;
    font-weight: 700;
  }

  .kp-input {
    width: 100%;
    height: 3.25rem;
    padding: 0 1.25rem;
    border: 1px solid var(--kp-border-2);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-card);
    color: var(--kp-ink);
    font-size: 1rem;
    transition: border-color var(--kp-duration) var(--kp-ease);
  }

  .kp-input::placeholder {
    color: var(--kp-muted);
  }

  .kp-input:focus {
    border-color: var(--kp-brand);
    outline: none;
  }

  .kp-input:focus-visible {
    outline: 3px solid var(--kp-focus);
    outline-offset: 2px;
  }

  .kp-input[aria-invalid="true"] {
    padding-inline: 1.1875rem;
    border: 2px solid var(--kp-error);
  }

  .kp-field__error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--kp-error);
    font-size: 0.875rem;
    font-weight: 700;
  }

  .kp-waitlist {
    display: flex;
    flex-direction: column;
    gap: 1.375rem;
  }

  .kp-waitlist__form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.625rem;
  }

  .kp-waitlist__form:has([aria-invalid="true"]) {
    align-items: flex-start;
  }

  .kp-waitlist__form:has([aria-invalid="true"]) .kp-button {
    margin-block-start: 1.875rem;
  }

  .kp-waitlist__form .kp-button {
    min-height: 3.25rem;
    padding-inline: var(--kp-space-6);
    font-size: 1rem;
  }

  .kp-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.125rem 1.25rem;
    border-radius: 1.375rem;
    background: var(--kp-card);
  }

  .kp-notice__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--kp-yellow);
    color: var(--kp-night);
  }

  .kp-notice__text {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-1);
  }

  .kp-notice__text strong {
    font-size: 1.0625rem;
  }

  .kp-notice__text span {
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
    line-height: var(--kp-body-leading);
  }

  /* Filters: links, not buttons, since each filter is a page; a rail on phones. */
  .kp-filters {
    display: flex;
    gap: var(--kp-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .kp-filters > li {
    flex-shrink: 0;
  }

  .kp-filters::-webkit-scrollbar {
    display: none;
  }

  @media (min-width: 40rem) {
    .kp-filters {
      flex-wrap: wrap;
      overflow: visible;
    }
  }

  .kp-filter {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--kp-space-2);
    min-height: var(--kp-target);
    padding: 0 var(--kp-space-4);
    border: 1px solid var(--kp-border-2);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-card);
    color: var(--kp-ink);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--kp-duration) var(--kp-ease);
  }

  .kp-filter:hover {
    background: var(--kp-alt);
    color: var(--kp-ink);
  }

  .kp-filter:has(img) {
    padding-inline-start: 0.5625rem;
  }

  .kp-filter[aria-current="page"] {
    border-color: var(--kp-btn-bg);
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
  }

  /* Pagination: Newer and Older with a few page numbers; "Page 1 of 21" on phones. */
  .kp-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-1);
  }

  .kp-pagination a,
  .kp-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--kp-target);
    min-height: var(--kp-target);
    border-radius: var(--kp-radius-pill);
    font-size: 0.9375rem;
    font-weight: 800;
    text-decoration: none;
  }

  .kp-pagination a {
    color: var(--kp-brand);
  }

  .kp-pagination a:not([aria-current]):hover {
    background: var(--kp-alt);
  }

  .kp-pagination [aria-current="page"] {
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
  }

  .kp-pagination .kp-pagination__step {
    padding-inline: 0.875rem;
    border: 1px solid var(--kp-border-2);
  }

  .kp-pagination span.kp-pagination__step {
    border-color: var(--kp-border);
    color: var(--kp-muted);
    font-weight: 700;
  }

  .kp-pagination .kp-pagination__gap {
    min-width: 1.5rem;
    color: var(--kp-muted);
  }

  .kp-pagination__summary {
    display: none;
  }

  @media (max-width: 39.99rem) {
    .kp-pagination__page,
    .kp-pagination__gap {
      display: none !important;
    }

    .kp-pagination .kp-pagination__summary {
      display: flex;
      flex-grow: 1;
      color: var(--kp-muted);
      font-weight: 700;
    }
  }

  .kp-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-2);
    margin: 0;
    padding: 0;
    color: var(--kp-muted);
    font-size: 0.9375rem;
    list-style: none;
  }

  .kp-breadcrumb li + li::before {
    content: "/";
    margin-inline-end: var(--kp-space-2);
  }

  .kp-breadcrumb a {
    font-weight: 700;
    text-decoration: none;
  }

  .kp-breadcrumb a:hover {
    text-decoration: underline;
  }

  /* Section header: a heading, an optional lead, and one link on the right that wraps under it on phones. */
  .kp-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--kp-space-3) var(--kp-space-6);
    margin-block-end: var(--kp-space-8);
  }

  .kp-section-head__text {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    max-width: var(--kp-measure-wide);
  }

  .kp-section-head h2 {
    font-size: var(--kp-text-h2);
  }

  .kp-section-head p {
    color: var(--kp-ink-2);
    font-size: var(--kp-text-lead);
    line-height: var(--kp-body-leading);
  }
}
/*
 * Cards for content (KID-1324): a free tool (with its preview when featured) and a blog post, on the home page and
 * the app pages.
 */

@layer components {
  .kp-tool-card {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    min-width: 0;
    padding: var(--kp-space-6);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
    color: var(--kp-ink);
    text-decoration: none;
    transition: background-color var(--kp-duration) var(--kp-ease);
  }

  .kp-tool-card:hover {
    background: var(--kp-alt-2);
    color: var(--kp-ink);
  }

  .kp-tool-card--featured {
    gap: var(--kp-space-5);
    padding: var(--kp-space-7);
  }

  .kp-tool-card__app {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
  }

  .kp-tool-card__app .kp-mark {
    border-radius: 0.5rem;
  }

  .kp-tool-card__badge {
    margin-inline-start: auto;
    background: var(--kp-yellow);
    color: var(--kp-night);
  }

  .kp-tool-card__text {
    min-width: 0;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    flex-grow: 1;
  }

  .kp-tool-card__title {
    font-family: var(--kp-font-display);
    font-size: 1.25rem;
    font-weight: 900;
    line-height: var(--kp-title-leading, 1.2);
  }

  .kp-tool-card--featured .kp-tool-card__title {
    color: var(--kp-head);
    font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
    line-height: var(--kp-heading-leading, 1.1);
  }

  .kp-tool-card__summary {
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
    line-height: var(--kp-body-leading);
  }

  .kp-tool-card--featured .kp-tool-card__summary {
    font-size: 1rem;
  }

  .kp-tool-card__preview {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 1.125rem;
    border-radius: var(--kp-radius-md);
    background: var(--kp-card);
  }

  .kp-tool-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-3);
  }

  .kp-tool-card__cta {
    color: var(--kp-brand);
    font-size: 0.9375rem;
    font-weight: 800;
  }

  .kp-tool-card__cta::after {
    content: " \2192";
  }

  .kp-tool-card__uses {
    color: var(--kp-brand-2);
    font-size: 0.875rem;
    font-weight: 700;
  }

  /* A tool's preview: its sample input as chips, a small drawing, and the result, in the tool's own words */
  .kp-preview__chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
    gap: var(--kp-space-2);
  }

  .kp-preview__chip {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.5625rem 0.75rem;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
  }

  .kp-preview__chip span {
    overflow-wrap: anywhere;
    color: var(--kp-muted);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .kp-preview__chip strong {
    font-size: 0.9375rem;
    overflow-wrap: anywhere;
  }

  .kp-preview__chart {
    width: 100%;
    height: auto;
  }

  .kp-preview__band {
    fill: var(--kp-alt);
  }

  .kp-preview__line {
    fill: none;
    stroke: var(--kp-g-purple);
    stroke-width: 3;
    stroke-linecap: round;
  }

  .kp-preview__dot {
    fill: var(--kp-g-purple);
  }

  .kp-preview__dot--end {
    stroke: var(--kp-card);
    stroke-width: 3;
  }

  .kp-preview__result {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--kp-space-1) var(--kp-space-3);
  }

  .kp-preview__result span {
    color: var(--kp-muted);
    font-size: 0.875rem;
  }

  .kp-preview__result strong {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.5rem;
    font-weight: 900;
  }

  .kp-preview__printable {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    text-align: center;
  }

  .kp-preview__printable strong {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: 1.25rem;
    font-weight: 900;
  }

  .kp-preview__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.375rem;
  }

  .kp-preview__day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.125rem;
    border: 1px solid var(--kp-border);
    border-radius: 0.625rem;
    color: var(--kp-muted);
    font-size: 0.6875rem;
    font-weight: 700;
  }

  .kp-preview__day svg {
    fill: var(--kp-star-empty);
  }

  .kp-preview__day--done svg {
    fill: var(--kp-star);
    stroke: var(--kp-star-stroke);
    stroke-width: 1;
  }

  .kp-preview__note {
    color: var(--kp-ink-2);
    font-size: 0.875rem;
  }

  .kp-preview__bars {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
  }

  .kp-preview__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
    gap: var(--kp-space-3);
    font-size: 0.8125rem;
    font-weight: 700;
  }

  .kp-preview__meter {
    height: 0.5rem;
    overflow: hidden;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-alt);
  }

  .kp-preview__meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--kp-g-purple);
  }

  /* A blog post */
  .kp-post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
    color: var(--kp-ink);
    text-decoration: none;
  }

  .kp-post-card:hover {
    color: var(--kp-ink);
  }

  .kp-post-card:hover .kp-post-card__title {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }

  .kp-post-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .kp-post-card__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kp-alt-2);
  }

  .kp-post-card__text {
    min-width: 0;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    padding: var(--kp-space-5) var(--kp-space-6) var(--kp-space-6);
  }

  .kp-post-card__title {
    font-family: var(--kp-font-display);
    font-size: 1.1875rem;
    font-weight: 800;
    line-height: var(--kp-title-leading, 1.3);
  }
}
/*
 * Our devices (KID-1338, the canvas's HomeB, AppB and CollarB boards): the devices section of the home and app
 * pages, a device's card and photo, and the waitlist form as a card and on the purple band.
 */

@layer components {
  /* A 4:3 photo fills its frame, a scene or a product on white alike; a photo of another shape loses a little at its
     edges rather than showing bars, and a transparent one sits on white in both themes */
  .kp-device-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--kp-radius-lg);
    background: #ffffff;
  }

  .kp-device-photo img:not(.kp-mark) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* No photo yet: the app's mark, at its own size, holds the place */
  .kp-device-photo .kp-mark {
    width: 6rem;
    height: 6rem;
  }

  .kp-device-card {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    min-width: 0;
    padding: var(--kp-space-6);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-alt);
  }

  /* One device: its photo beside the text, the whole card on lavender */
  .kp-device-card--wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-8);
    align-items: center;
    padding: clamp(1.25rem, 0.5rem + 3vw, 3rem);
    border-radius: var(--kp-radius-xl);
  }

  @media (min-width: 64rem) {
    .kp-device-card--wide {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 3.5rem;
    }
  }

  .kp-device-card__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--kp-space-4);
    min-width: 0;
  }

  .kp-device-card__labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
  }

  .kp-device-card__name {
    font-size: var(--kp-text-h2);
  }

  .kp-device-card__summary {
    color: var(--kp-ink-2);
    font-size: var(--kp-text-body-l);
    line-height: var(--kp-reading-leading);
  }

  .kp-device-card:not(.kp-device-card--wide) .kp-device-card__summary {
    flex-grow: 1;
    font-size: var(--kp-text-body);
  }

  .kp-device-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kp-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kp-device-card__chips .kp-chip {
    background: var(--kp-card);
  }

  .kp-device-card__price {
    font-weight: 800;
  }

  .kp-device-card__head {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
  }

  .kp-device-card__head > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .kp-device-card__title {
    color: var(--kp-ink);
    font-family: var(--kp-font-display);
    font-size: 1.375rem;
    font-weight: var(--kp-display-weight);
    line-height: var(--kp-heading-leading);
    text-decoration: none;
  }

  .kp-device-card__title:hover {
    text-decoration: underline;
  }

  .kp-device-card__meta {
    color: var(--kp-brand-2);
    font-size: 0.875rem;
    font-weight: 700;
  }

  .kp-device-card .kp-waitlist__box,
  .kp-device-card__text .kp-waitlist__box {
    align-self: stretch;
  }

  /* Several devices: a heading, then the cards two to a row */
  .kp-devices__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--kp-space-3);
    max-width: 47.5rem;
  }

  .kp-devices__head h2 {
    font-size: var(--kp-text-h2);
  }

  .kp-devices__head p {
    color: var(--kp-ink-2);
    font-size: var(--kp-text-body-l);
    line-height: var(--kp-reading-leading);
  }

  .kp-devices__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
  }

  @media (min-width: 48rem) {
    .kp-devices__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  /* The waitlist form: its notice and Google's reCAPTCHA line under it */
  .kp-waitlist__box {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    max-width: 35rem;
  }

  .kp-waitlist__box .kp-recaptcha-notice {
    margin: 0;
    font-size: var(--kp-text-caption);
    text-align: start;
  }

  .kp-waitlist__box .kp-notice:focus {
    outline: none;
  }

  /* A card's form: the label for screen readers, a shorter field and button */
  .kp-waitlist__form--compact {
    gap: var(--kp-space-2);
  }

  .kp-waitlist__form--compact .kp-input,
  .kp-waitlist__form--compact .kp-button {
    min-height: 3rem;
    height: 3rem;
  }

  .kp-waitlist__form--compact .kp-field {
    flex-basis: 12.5rem;
  }

  .kp-waitlist__form--compact:has([aria-invalid="true"]) .kp-button,
  .kp-waitlist__form--compact:has(.kp-field__error:not([hidden])) .kp-button {
    margin-block-start: 0;
  }

  /* An error under the field pushes the button down to the field's line */
  .kp-waitlist__form:has(.kp-field__error:not([hidden])) {
    align-items: flex-start;
  }

  .kp-waitlist__form:not(.kp-waitlist__form--compact):has(.kp-field__error:not([hidden])) .kp-button {
    margin-block-start: 1.875rem;
  }

  /* On the purple band: the label and the lines under the form in light ink */
  .kp-on-band .kp-field label,
  .kp-on-band .kp-recaptcha-notice,
  .kp-on-band .kp-recaptcha-notice a {
    color: #ffffff;
  }

  .kp-on-band .kp-field__error {
    color: #ffd2cf;
  }

  /* The sent notice is a white card, so it keeps its own ink on the band */
  .kp-on-band .kp-notice {
    color: var(--kp-ink);
  }
}

@layer components {
  /* The confirm and leave pages: one card in the middle of the page */
  .kp-waitlist-page__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--kp-space-4);
    max-width: calc(36rem + 2 * var(--kp-gutter));
    text-align: center;
  }

  .kp-waitlist-page__card .kp-device-photo {
    width: 12rem;
  }

  .kp-waitlist-page__card h1 {
    font-size: var(--kp-text-h2);
  }

  .kp-waitlist-page__card p {
    color: var(--kp-ink-2);
    font-size: var(--kp-text-body-l);
    line-height: var(--kp-reading-leading);
    overflow-wrap: anywhere;
  }

  .kp-waitlist-page__form {
    margin-block-start: var(--kp-space-2);
  }
}
/*
 * The footers (components board: Footers): night in light mode, deeper night in dark mode; yellow column labels,
 * links in ink on night (15.3:1). The only dark band on a light page, at its end.
 */

@layer components {
  .kp-footer {
    --kp-focus: var(--kp-yellow);
    background: var(--kp-footer);
    color: #eeebf8;
  }

  .kp-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding-block: 4rem 2.5rem;
  }

  .kp-footer__columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
  }

  .kp-footer__brand {
    display: flex;
    flex: 2 1 16.25rem;
    flex-direction: column;
    gap: var(--kp-space-4);
    min-width: 0;
  }

  .kp-footer__brand > a {
    align-self: flex-start;
    color: #ffffff;
  }

  .kp-footer__brand svg {
    width: 7.75rem;
    height: 2rem;
  }

  .kp-footer__app {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    color: #ffffff;
    font-family: var(--kp-font-display);
    font-size: 1.375rem;
    font-weight: 900;
    text-decoration: none;
  }

  .kp-footer__app:hover {
    color: #ffffff;
  }

  .kp-footer__tagline {
    max-width: 18.75rem;
    color: #c9c3e6;
    font-size: 1rem;
    line-height: var(--kp-body-leading);
  }

  .kp-footer__column {
    display: flex;
    flex: 1 1 9.375rem;
    flex-direction: column;
    gap: var(--kp-space-3);
  }

  .kp-footer__label {
    color: var(--kp-yellow);
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: var(--kp-label-tracking);
    text-transform: var(--kp-eyebrow-case);
  }

  .kp-footer a:not(.kp-footer__app, .kp-button) {
    color: #eeebf8;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 4px;
  }

  .kp-footer a:not(.kp-footer__app, .kp-button):hover {
    color: #ffffff;
    text-decoration: underline;
  }

  .kp-footer button.kp-footer__link {
    padding: 0;
    border: 0;
    background: none;
    color: #eeebf8;
    font-size: 1rem;
    text-align: start;
  }

  .kp-footer button.kp-footer__link:hover {
    color: #ffffff;
    text-decoration: underline;
  }

  .kp-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-4);
    padding-block-start: var(--kp-space-6);
    border-block-start: 1px solid rgb(255 255 255 / 0.14);
    color: #c9c3e6;
    font-size: 0.875rem;
  }

  .kp-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-2) var(--kp-space-5);
  }

  .kp-footer a.kp-footer__made-by {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-2);
    color: #c9c3e6;
    font-size: 0.875rem;
  }

  .kp-footer__made-by-logo {
    width: 4rem;
    height: 1rem;
    color: #ffffff;
  }

  .kp-footer__locales {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kp-footer .kp-footer__locales a {
    font-size: 0.875rem;
    color: #c9c3e6;
  }

  .kp-footer .kp-footer__locales a[aria-current="true"] {
    color: #ffffff;
    font-weight: 800;
  }

  .kp-footer__end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-4);
  }

  /* On touch screens every link is a 44 px target, so the columns trade their gap for the links' height. */
  @media (pointer: coarse) {
    .kp-footer__column {
      gap: 0;
    }

    .kp-footer__column a,
    .kp-footer__locales a {
      display: inline-flex;
      align-items: center;
      min-height: var(--kp-target);
    }

    .kp-footer__locales {
      gap: 0 var(--kp-space-4);
    }
  }

  .kp-footer .kp-theme-toggle {
    color: #c9c3e6;
  }

  .kp-footer .kp-theme-toggle:hover {
    background: rgb(255 255 255 / 0.1);
    color: #ffffff;
  }
}
/*
 * The headers (components board: Headers): the main site's (Kidplay logo, nav, locale, Get the apps) and an app
 * site's (mark and name with "by Kidplay", its nav, locale, Get the app). The full nav from 1024 px; below it the
 * menu button opens the phone menu, a sheet.
 */

@layer components {
  .kp-header {
    --kp-header-nav-bg: var(--kp-alt);
    position: relative;
    z-index: 20;
    background: var(--kp-header-bg, var(--kp-bg));
  }

  .kp-header--alt {
    --kp-header-bg: var(--kp-alt);
    --kp-header-nav-bg: var(--kp-nav-bg);
  }

  .kp-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-6);
    min-height: 4.75rem;
    padding-block: var(--kp-space-4);
  }

  .kp-header__logo {
    display: inline-flex;
    align-items: center;
    color: var(--kp-head);
    border-radius: var(--kp-radius-xs);
  }

  .kp-header__logo svg {
    width: 7.75rem;
    height: 2rem;
  }

  .kp-header__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-3);
    color: var(--kp-ink);
    text-decoration: none;
    border-radius: var(--kp-radius-sm);
  }

  .kp-header__brand:hover {
    color: var(--kp-ink);
  }

  .kp-header__name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }

  .kp-header__name strong {
    font-family: var(--kp-font-display);
    font-size: 1.375rem;
    font-weight: 900;
  }

  .kp-header__name span {
    color: var(--kp-muted);
    font-size: 0.8125rem;
    line-height: var(--kp-ui-leading);
  }

  .kp-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-header-nav-bg);
  }

  .kp-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2.75rem;
    padding: 0.625rem 1rem;
    border-radius: var(--kp-radius-pill);
    color: var(--kp-ink);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: var(--kp-ui-leading);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--kp-duration) var(--kp-ease);
  }

  .kp-nav a:hover {
    background: var(--kp-card);
    color: var(--kp-ink);
  }

  .kp-nav a[aria-current="page"],
  .kp-nav a[aria-current="true"] {
    padding-inline: 1.125rem;
    background: var(--kp-btn-bg);
    color: var(--kp-btn-ink);
  }

  .kp-header__actions {
    display: none;
    align-items: center;
    gap: var(--kp-space-3);
  }

  .kp-header__menu-button {
    background: var(--kp-header-nav-bg);
  }

  @media (min-width: 64rem) {
    .kp-nav,
    .kp-header__actions {
      display: flex;
    }

    .kp-header__menu-button {
      display: none;
    }
  }

  /* The locale button and its menu: a popover on desktop. */
  .kp-locale {
    position: relative;
  }

  .kp-locale__button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: var(--kp-target);
    padding: 0 0.75rem 0 0.875rem;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-card);
    color: var(--kp-ink);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: border-color var(--kp-duration) var(--kp-ease);
  }

  .kp-locale__button:hover {
    border-color: var(--kp-border-2);
  }

  .kp-locale__button svg {
    transition: transform var(--kp-duration) var(--kp-ease);
  }

  .kp-locale__button[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .kp-locale__menu {
    position: absolute;
    inset-block-start: calc(100% + var(--kp-space-2));
    inset-inline-end: 0;
    z-index: 30;
    width: 16.25rem;
    padding: var(--kp-space-2);
    border: 1px solid var(--kp-border);
    border-radius: 1.375rem;
    background: var(--kp-card);
    box-shadow: var(--kp-shadow-1);
  }

  .kp-locale-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kp-locale-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-3);
    min-height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.75rem;
    color: var(--kp-ink);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
  }

  .kp-locale-list a:hover {
    background: var(--kp-alt);
    color: var(--kp-ink);
  }

  .kp-locale-list a[aria-current="true"] {
    background: var(--kp-alt);
    font-weight: 800;
  }

  .kp-locale-list svg {
    color: var(--kp-brand);
  }

  /* The theme switch: a quiet icon button beside the locale. */
  .kp-theme-toggle {
    background: transparent;
    color: var(--kp-muted);
  }

  .kp-theme-toggle:hover {
    background: var(--kp-header-nav-bg);
    color: var(--kp-ink);
  }

  .kp-theme-toggle .kp-theme-toggle__dark {
    display: none;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .kp-theme-toggle__dark {
      display: block;
    }

    :root:not([data-theme="light"]) .kp-theme-toggle__light {
      display: none;
    }
  }

  :root[data-theme="dark"] .kp-theme-toggle__dark {
    display: block;
  }

  :root[data-theme="dark"] .kp-theme-toggle__light {
    display: none;
  }
}
/*
 * A list of content (KID-1324, the canvas's BlogB board): the blog, gear reviews and What's new. The header, the
 * filters, the latest item as the large card, a grid of three (one on phones), and the cards.
 */

@layer components {
  .kp-listing {
    padding-block: clamp(1.5rem, 0.6rem + 2.5vw, 3.5rem) var(--kp-section);
  }

  .kp-listing__inner {
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 1.4rem + 0.95vw, 2.5rem);
  }

  .kp-listing__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    max-width: 47.5rem;
  }

  .kp-listing__eyebrow {
    padding: 0.5rem 0.875rem;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-alt);
    color: var(--kp-brand-2);
    font-size: var(--kp-text-eyebrow);
    font-weight: 800;
    line-height: var(--kp-ui-leading);
    letter-spacing: var(--kp-eyebrow-tracking);
    text-transform: var(--kp-eyebrow-case);
  }

  .kp-listing__head h1 {
    font-size: clamp(2.75rem, 2.2rem + 2.2vw, 4.5rem);
    line-height: calc(var(--kp-display-leading) - 0.03);
    letter-spacing: var(--kp-display-tracking-tight);
  }

  .kp-listing__head p {
    color: var(--kp-ink-2);
    font-size: var(--kp-text-lead);
    line-height: var(--kp-body-leading);
  }

  /* The filters bleed to the screen's edges on phones, so the rail scrolls under the gutter */
  .kp-listing__filters {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    margin-inline: calc(-1 * var(--kp-gutter));
  }

  .kp-listing__filters .kp-filters {
    padding: 0.125rem var(--kp-gutter);
    scroll-padding-inline: var(--kp-gutter);
  }

  .kp-filters--quiet .kp-filter {
    min-height: 2.5rem;
    border-color: transparent;
    background: var(--kp-alt);
    font-size: 0.875rem;
  }

  .kp-filters--quiet .kp-filter:hover {
    background: var(--kp-alt-2);
  }

  .kp-filter[aria-current="true"] {
    border-color: var(--kp-btn-bg);
    box-shadow: inset 0 0 0 1px var(--kp-btn-bg);
  }

  .kp-filters--quiet .kp-filter[aria-current="page"] {
    border-color: var(--kp-btn-bg);
    background: var(--kp-btn-bg);
  }

  .kp-listing__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem 1.75rem;
  }

  @media (min-width: 40rem) {
    .kp-listing__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (min-width: 64rem) {
    .kp-listing__grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      row-gap: 3rem;
    }
  }

  .kp-listing__empty {
    color: var(--kp-muted);
    font-size: var(--kp-text-body-l);
  }

  .kp-listing .kp-pagination {
    justify-content: center;
  }

  /* A card: the image, the app, the title, the summary in two lines and the date */
  .kp-article-card {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
    color: var(--kp-ink);
    text-decoration: none;
  }

  .kp-article-card:hover {
    color: var(--kp-ink);
  }

  .kp-article-card:hover .kp-article-card__title {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  .kp-article-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 1.375rem;
    background: var(--kp-alt);
  }

  .kp-article-card__image--contain {
    padding: var(--kp-space-4);
    background: #ffffff;
    object-fit: contain;
  }

  .kp-article-card__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .kp-article-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .kp-article-card__app {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-2);
  }

  .kp-article-card__app .kp-eyebrow {
    font-size: 0.75rem;
    letter-spacing: var(--kp-label-tracking);
  }

  .kp-article-card__app .kp-badge {
    margin-inline-start: 0.125rem;
  }

  .kp-article-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: clamp(1.25rem, 1.2rem + 0.2vw, 1.3125rem);
    font-weight: 800;
    line-height: var(--kp-title-leading, 1.25);
  }

  .kp-article-card__summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
    line-height: var(--kp-body-leading);
  }

  .kp-article-card__meta {
    color: var(--kp-muted);
    font-size: 0.875rem;
  }

  /* The latest: the image beside the text on lavender, stacked on phones */
  .kp-article-card--latest {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.125rem;
    padding: 0.75rem;
    border-radius: var(--kp-radius-xl);
    background: var(--kp-alt);
  }

  .kp-article-card--latest .kp-article-card__image {
    border-radius: 1.5rem;
    background: var(--kp-alt-2);
  }

  .kp-article-card--latest .kp-article-card__text {
    padding: 0 0.5rem 0.75rem;
  }

  .kp-article-card--latest .kp-article-card__title {
    font-size: clamp(1.625rem, 1.3rem + 1.35vw, 2.5rem);
    font-weight: 900;
    line-height: var(--kp-heading-leading, 1.1);
    letter-spacing: -0.01em;
  }

  .kp-article-card--latest .kp-article-card__summary {
    -webkit-line-clamp: 3;
    font-size: 1.0625rem;
    line-height: var(--kp-reading-leading);
  }

  @media (min-width: 64rem) {
    .kp-article-card--latest {
      grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
      align-items: center;
      gap: 2.5rem;
      padding: 1.25rem;
    }

    .kp-article-card--latest .kp-article-card__text {
      padding: 0 1.5rem 0 0;
    }
  }
}
/*
 * The phone menu (components board: Headers): a modal sheet (a native dialog, so focus stays inside and Escape
 * closes it) with the nav, the apps, Get the apps and the language.
 */

@layer components {
  .kp-menu {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--kp-bg);
    color: var(--kp-ink);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .kp-menu::backdrop {
    background: rgb(23 19 46 / 0.4);
  }

  @media (min-width: 40rem) {
    .kp-menu {
      inset-inline: auto 0;
      width: 24.375rem;
      border-inline-start: 1px solid var(--kp-sheet-border);
      box-shadow: var(--kp-shadow-2);
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    .kp-menu[open] {
      animation: kp-menu-in 200ms var(--kp-ease);
    }
  }

  @keyframes kp-menu-in {
    from {
      opacity: 0;
      transform: translateY(-0.5rem);
    }
  }

  .kp-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem var(--kp-gutter);
    border-block-end: 1px solid var(--kp-border);
  }

  .kp-menu__head .kp-header__logo svg {
    width: 6.875rem;
    height: 1.75rem;
  }

  .kp-menu__nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem var(--kp-gutter) 0.5rem;
  }

  .kp-menu__nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.5rem;
    border-block-end: 1px solid var(--kp-border);
    color: var(--kp-ink);
    font-family: var(--kp-font-display);
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
  }

  .kp-menu__nav a svg {
    color: var(--kp-muted);
  }

  .kp-menu__nav a[aria-current="page"] {
    color: var(--kp-brand);
  }

  .kp-menu__apps {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.75rem var(--kp-gutter);
  }

  .kp-menu__app {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    min-height: var(--kp-target);
    color: var(--kp-ink);
    text-decoration: none;
  }

  .kp-menu__app:hover {
    color: var(--kp-ink);
  }

  .kp-menu__app span {
    display: flex;
    flex-direction: column;
    line-height: var(--kp-ui-leading);
  }

  .kp-menu__app strong {
    font-size: 1rem;
  }

  .kp-menu__app small {
    color: var(--kp-muted);
    font-size: 0.8125rem;
  }

  .kp-menu__foot {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    padding: var(--kp-space-4) var(--kp-gutter) var(--kp-space-5);
    border-block-start: 1px solid var(--kp-border);
  }

  .kp-menu__locales {
    border: 1px solid var(--kp-border-2);
    border-radius: 1.375rem;
  }

  .kp-menu__locales summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-2);
    min-height: var(--kp-target);
    border-radius: var(--kp-radius-pill);
    font-size: 0.9375rem;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
  }

  .kp-menu__locales summary::-webkit-details-marker {
    display: none;
  }

  .kp-menu__locales[open] summary {
    border-block-end: 1px solid var(--kp-border);
    border-radius: 1.375rem 1.375rem 0 0;
  }

  .kp-menu__locales .kp-locale-list {
    padding: var(--kp-space-2);
  }

  .kp-menu__locales .kp-locale-list a {
    min-height: var(--kp-target);
  }
}
/*
 * The rail (components board: Rail): one horizontal row for the home page's apps, an app's "A look inside", and
 * reviews and tools on phones. CSS scroll-snap, edge to edge with the first item on the page margin and the next
 * peeking; on desktop, previous and next buttons that move one view and disable at the ends, and a fade on the side
 * that has more. A focusable, labelled region; every item is in the HTML once.
 */

@layer components {
  .kp-rail {
    --kp-rail-gap: var(--kp-space-4);
    --kp-rail-item: 12.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
  }

  .kp-rail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-4);
  }

  .kp-rail__title {
    font-size: var(--kp-text-h2);
  }

  .kp-rail__buttons {
    display: none;
    gap: 0.625rem;
  }

  @media (min-width: 64rem) {
    .kp-rail__buttons {
      display: flex;
    }
  }

  .kp-rail__track {
    display: flex;
    gap: var(--kp-rail-gap);
    margin-inline: calc(var(--kp-gutter) * -1);
    padding-inline: var(--kp-gutter);
    padding-block: 0.25rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--kp-gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: var(--kp-radius-lg);
  }

  .kp-rail__track::-webkit-scrollbar {
    display: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    .kp-rail__track {
      scroll-behavior: smooth;
    }
  }

  .kp-rail__track > * {
    flex: 0 0 var(--kp-rail-item);
    scroll-snap-align: start;
  }

  .kp-rail__track:focus-visible {
    outline-offset: 4px;
  }

  /* The fade shows only on a side that has more (rail_controller sets data-more). */
  .kp-rail__track[data-more="end"] {
    mask-image: linear-gradient(to right, #000 calc(100% - 4rem), transparent);
  }

  .kp-rail__track[data-more="start"] {
    mask-image: linear-gradient(to left, #000 calc(100% - 4rem), transparent);
  }

  .kp-rail__track[data-more="both"] {
    mask-image: linear-gradient(to right, transparent, #000 4rem, #000 calc(100% - 4rem), transparent);
  }

  .kp-rail figure {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    margin: 0;
  }

  .kp-rail figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
  }

  .kp-rail figcaption strong {
    font-family: var(--kp-font-display);
    font-size: 1.0625rem;
    font-weight: 800;
  }

  .kp-rail figcaption span {
    color: var(--kp-muted);
    font-size: 0.875rem;
  }
}
/*
 * Store badges, the QR code, ratings and stars (components board: Store badges, Rating summary), and the sticky
 * Get bar on phones (Headers: Smart App Banner and Get bar).
 */

@layer components {
  .kp-store-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-4) var(--kp-space-6);
  }

  .kp-store-badges__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-3);
  }

  .kp-store-badge {
    display: inline-block;
    border-radius: 0.625rem;
    transition: transform var(--kp-duration) var(--kp-ease);
  }

  .kp-store-badge:active {
    transform: translateY(1px);
  }

  .kp-store-badge img {
    width: auto;
    height: 3rem;
  }

  @media (min-width: 64rem) {
    .kp-store-badge img {
      height: 3.375rem;
    }
  }

  .kp-qr {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    margin: 0;
    color: var(--kp-muted);
    font-size: 0.8125rem;
    line-height: var(--kp-ui-leading);
  }

  .kp-qr figcaption {
    max-width: 8rem;
  }

  .kp-qr__code {
    flex-shrink: 0;
    width: 5.5rem;
    height: 5.5rem;
    padding: 0.375rem;
    border-radius: var(--kp-radius-sm);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--kp-border);
  }

  .kp-qr__code svg {
    width: 100%;
    height: 100%;
  }

  /* Stars: full, half (a 4.6 average shows four and a half) or empty. */
  .kp-stars {
    display: inline-flex;
    gap: 0.125rem;
    vertical-align: middle;
  }

  .kp-star {
    flex-shrink: 0;
  }

  .kp-star__outline {
    fill: var(--kp-star-empty);
    stroke: var(--kp-star-stroke);
    stroke-width: 1;
  }

  .kp-star--full .kp-star__outline {
    fill: var(--kp-star);
  }

  .kp-star__fill {
    fill: var(--kp-star);
    clip-path: inset(0 50% 0 0);
  }

  /* The hero chip: both stores, the stars for the App Store's average. */
  .kp-rating-chip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kp-space-2);
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
  }

  .kp-rating-chip strong {
    color: var(--kp-ink);
  }

  /* The reviews section's summary: the number large, its stars, the counts beside it. */
  .kp-rating-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--kp-space-5);
    padding: var(--kp-space-5);
    border-radius: 1.375rem;
    background: var(--kp-alt);
  }

  .kp-rating-summary__value {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
  }

  .kp-rating-summary__value strong {
    color: var(--kp-head);
    font-family: var(--kp-font-display);
    font-size: var(--kp-text-stat);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .kp-rating-summary__counts {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-1);
    padding-block-end: 0.125rem;
    color: var(--kp-muted);
    font-size: 0.9375rem;
  }

  .kp-rating-summary__counts strong {
    color: var(--kp-ink);
  }

  /* The sticky Get bar: phones only, once the hero's badge has scrolled away, never over the closing band. */
  .kp-get-bar {
    position: fixed;
    inset-inline: var(--kp-space-3);
    inset-block-end: max(var(--kp-space-3), env(safe-area-inset-bottom));
    z-index: 15;
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    padding: 0.625rem 0.625rem 0.625rem 0.875rem;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-md);
    background: var(--kp-card);
    box-shadow: var(--kp-shadow-1);
    transition: transform 200ms var(--kp-ease), opacity 200ms var(--kp-ease), visibility 200ms;
  }

  .kp-get-bar[data-visible="false"] {
    visibility: hidden;
    opacity: 0;
    transform: translateY(calc(100% + var(--kp-space-4)));
  }

  .kp-get-bar__text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    line-height: var(--kp-ui-leading);
  }

  .kp-get-bar__text strong {
    font-size: 0.9375rem;
  }

  /* The proof wraps on a narrow phone in a long language rather than lose the store's name to an ellipsis */
  .kp-get-bar__text span {
    color: var(--kp-muted);
    font-size: 0.8125rem;
    text-wrap: balance;
  }

  .kp-get-bar .kp-button {
    min-height: var(--kp-target);
    padding: 0.75rem 1.125rem;
  }

  @media (min-width: 40rem) {
    .kp-get-bar {
      display: none;
    }
  }
}
/*
 * The free tools (KID-1324): the form controls (SiteFormBuilder, also the surveys' and the waitlist's), the tools'
 * list, a tool's page, and its result on a paper sheet with the pieces results share. A tool's own styles (its
 * chart, its letter) are site/tools/<tool_key>.css, loaded on its pages only.
 */

@layer components {
  /* Form controls: a fieldset is a field whose label is its legend */
  .kp-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .kp-fieldset legend {
    margin-block-end: var(--kp-space-2);
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 700;
  }

  .kp-field__hint {
    color: var(--kp-muted);
    font-size: 0.875rem;
    line-height: var(--kp-body-leading);
  }

  .kp-select {
    padding-inline-end: 3rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%236b6788' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    cursor: pointer;
  }

  .kp-select:dir(rtl) {
    background-position: left 1rem center;
  }

  .kp-textarea {
    height: auto;
    min-height: 7.5rem;
    padding-block: 0.875rem;
    border-radius: var(--kp-radius-md);
    line-height: var(--kp-body-leading);
    resize: vertical;
  }

  /* Choices: real radios, hidden behind the box they check; the box shows the focus ring */
  .kp-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: var(--kp-space-2);
  }

  .kp-choice {
    position: relative;
    display: flex;
    min-width: 0;
    cursor: pointer;
  }

  .kp-choice__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }

  .kp-choice__box {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--kp-space-2);
    min-height: 5.5rem;
    padding: var(--kp-space-3);
    border: 1px solid var(--kp-border-2);
    border-radius: var(--kp-radius-md);
    background: var(--kp-card);
    color: var(--kp-ink);
    text-align: center;
    transition: background-color var(--kp-duration) var(--kp-ease), border-color var(--kp-duration) var(--kp-ease);
  }

  .kp-choice:hover .kp-choice__box {
    background: var(--kp-alt);
  }

  .kp-choice__input:checked + .kp-choice__box {
    padding: calc(var(--kp-space-3) - 1px);
    border: 2px solid var(--kp-brand);
    background: var(--kp-alt);
  }

  .kp-choice__input:focus-visible + .kp-choice__box {
    outline: 3px solid var(--kp-focus);
    outline-offset: 2px;
  }

  .kp-choice__input:disabled + .kp-choice__box {
    color: var(--kp-disabled);
    cursor: not-allowed;
  }

  .kp-choice__icon {
    font-size: 1.75rem;
    line-height: 1;
  }

  .kp-choice__label {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: var(--kp-ui-leading);
    overflow-wrap: anywhere;
  }

  .kp-choice__input:checked + .kp-choice__box .kp-choice__label {
    color: var(--kp-brand);
  }

  .kp-choice__desc {
    color: var(--kp-muted);
    font-size: 0.8125rem;
    line-height: var(--kp-ui-leading);
  }

  /* Pills: a wrapping row of short answers (a quiz's Yes, Sometimes, Rarely, No) */
  .kp-choices--pills {
    display: flex;
    flex-wrap: wrap;
  }

  .kp-choices--pills .kp-choice__box,
  .kp-choices--segmented .kp-choice__box {
    flex-direction: row;
    min-height: var(--kp-target);
    padding-block: 0.5rem;
    padding-inline: var(--kp-space-4);
    border-radius: var(--kp-radius-pill);
  }

  .kp-choices--pills .kp-choice__input:checked + .kp-choice__box,
  .kp-choices--segmented .kp-choice__input:checked + .kp-choice__box {
    padding-block: calc(0.5rem - 1px);
    padding-inline: calc(var(--kp-space-4) - 1px);
  }

  .kp-choices--pills .kp-choice__icon,
  .kp-choices--segmented .kp-choice__icon {
    font-size: 1.125rem;
  }

  /* Segmented: two or three ways, one bar (the unit system) */
  .kp-choices--segmented {
    display: inline-flex;
    gap: var(--kp-space-1);
    width: fit-content;
    max-width: 100%;
    padding: var(--kp-space-1);
    border-radius: var(--kp-radius-pill);
    background: var(--kp-alt);
  }

  .kp-choices--segmented .kp-choice__box {
    border-color: transparent;
    background: transparent;
  }

  .kp-choices--segmented .kp-choice:hover .kp-choice__box {
    background: var(--kp-alt-2);
  }

  .kp-choices--segmented .kp-choice__input:checked + .kp-choice__box {
    border-color: transparent;
    background: var(--kp-card);
    box-shadow: 0 1px 3px rgb(23 19 46 / 0.16);
  }

  /* Checkboxes */
  .kp-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: var(--kp-space-2);
  }

  .kp-check {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    min-height: var(--kp-target);
    padding: 0.625rem var(--kp-space-4);
    border: 1px solid var(--kp-border-2);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-card);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: var(--kp-ui-leading);
    cursor: pointer;
  }

  .kp-check:hover {
    background: var(--kp-alt);
  }

  .kp-check:has(:checked) {
    border-color: var(--kp-brand);
  }

  .kp-check__input {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--kp-brand);
  }

  /* A switch: a checkbox drawn as a track and knob */
  .kp-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--kp-space-3);
    min-height: var(--kp-target);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
  }

  .kp-switch__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .kp-switch__track {
    position: relative;
    flex-shrink: 0;
    width: 3rem;
    height: 1.75rem;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-border-2);
    transition: background-color var(--kp-duration) var(--kp-ease);
  }

  .kp-switch__track::after {
    content: "";
    position: absolute;
    inset-block-start: 0.1875rem;
    inset-inline-start: 0.1875rem;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgb(23 19 46 / 0.24);
    transition: transform var(--kp-duration) var(--kp-ease);
  }

  .kp-switch__input:checked + .kp-switch__track {
    background: var(--kp-brand);
  }

  .kp-switch__input:checked + .kp-switch__track::after {
    transform: translateX(1.25rem);
  }

  .kp-switch__input:checked + .kp-switch__track:dir(rtl)::after {
    transform: translateX(-1.25rem);
  }

  .kp-switch__input:focus-visible + .kp-switch__track {
    outline: 3px solid var(--kp-focus);
    outline-offset: 2px;
  }

  /* A value with its unit or currency beside it */
  .kp-input-affix {
    display: flex;
    align-items: center;
    gap: var(--kp-space-2);
  }

  .kp-input-affix > span {
    color: var(--kp-muted);
    font-weight: 700;
  }

  /* Google's reCAPTCHA notice, in place of its badge (site/components/_recaptcha_notice) */
  .kp-recaptcha-notice {
    color: var(--kp-muted);
    font-size: 0.8125rem;
    line-height: var(--kp-body-leading);
    text-align: center;
  }

  .kp-recaptcha-notice a {
    color: inherit;
  }

  body:has(.kp-recaptcha-notice) .grecaptcha-badge {
    visibility: hidden;
  }

  /* A tool's form: fields stacked, two side by side from tablet width, sections with a heading */
  .kp-tool-form {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-6);
  }

  .kp-tool-form .kp-field {
    flex: none;
  }

  /* Fields shown together for one answer (reveal_controller.js) */
  .kp-tool-form__group {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-6);
  }

  .kp-tool-form__pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-6);
  }

  @media (min-width: 40rem) {
    .kp-tool-form__pair {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .kp-tool-form__section {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-6);
    padding-block-start: var(--kp-space-6);
    border-block-start: 1px solid var(--kp-border);
  }

  /* A form that opens with a section needs no rule above it (the reCAPTCHA field and its scripts come first) */
  .kp-tool-form > .g-recaptcha-response + .kp-tool-form__section {
    padding-block-start: 0;
    border-block-start: 0;
  }

  .kp-tool-form__section > h2,
  .kp-tool-form__section > h3 {
    display: flex;
    align-items: center;
    gap: var(--kp-space-2);
    color: var(--kp-head);
    font-size: 1.25rem;
    line-height: var(--kp-title-leading);
  }

  /* A group that needs an answer takes the focus with its message (tool_form_controller.js); the message is enough */
  [data-tool-form-required]:focus {
    outline: none;
  }

  .kp-tool-form__note {
    color: var(--kp-muted);
    font-size: 0.875rem;
    line-height: var(--kp-body-leading);
  }

  .kp-tool-form__submit {
    width: 100%;
    margin-block-start: var(--kp-space-2);
  }

  /* Rows a visitor adds (repeater_controller.js) */
  .kp-rows {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
  }

  .kp-rows__row {
    display: flex;
    align-items: center;
    gap: var(--kp-space-2);
  }

  .kp-rows__row > .kp-input,
  .kp-rows__row > [data-reveal-target] {
    flex: 1;
    min-width: 0;
  }

  .kp-rows__row > [data-reveal-target] > .kp-input {
    width: 100%;
  }

  /* A row of several fields (an adult's name, phone, relationship and car), under its heading */
  .kp-rows__block {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    padding: var(--kp-space-4);
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-md);
  }

  .kp-rows__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-2);
    min-height: 2.5rem;
  }

  .kp-rows__head h3 {
    color: var(--kp-head);
    font-size: 1rem;
  }

  /* The rows that cannot be removed keep the button's place while another row shows one, so the fields line up */
  .kp-rows__fixed {
    visibility: hidden;
  }

  .kp-rows__add {
    align-self: flex-start;
  }

  /* The tools' list: the featured tool wide, then a grid of three (one on phones) */
  .kp-tools-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
  }

  @media (min-width: 40rem) {
    .kp-tools-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kp-tools-grid .kp-tool-card--featured {
      grid-column: span 2;
    }
  }

  @media (min-width: 64rem) {
    .kp-tools-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* The featured tool's words beside its preview, so the two cards next to it keep their own height */
    .kp-tools-grid .kp-tool-card--featured {
      display: grid;
      grid-row: span 2;
      grid-template-areas: "app preview" "text preview" "foot preview";
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
      grid-template-rows: auto 1fr auto;
      column-gap: var(--kp-space-7);
      align-items: start;
    }

    .kp-tools-grid .kp-tool-card--featured .kp-tool-card__app {
      grid-area: app;
    }

    .kp-tools-grid .kp-tool-card--featured .kp-tool-card__text {
      grid-area: text;
    }

    .kp-tools-grid .kp-tool-card--featured .kp-tool-card__preview {
      grid-area: preview;
      align-self: center;
    }

    .kp-tools-grid .kp-tool-card--featured .kp-tool-card__foot {
      grid-area: foot;
    }
  }

  .kp-tool-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kp-space-4);
  }

  @media (min-width: 48rem) {
    .kp-tool-cards {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  /* A tool's page and its result. Headings wrap anywhere as a last resort, since a heading sized to its content
     otherwise keeps a Japanese name, one long phrase, on one line past the screen's edge. */
  .kp-tool {
    padding-block-end: var(--kp-section);
  }

  .kp-tool__container {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-6);
    max-width: calc(var(--kp-measure-wide) + 2 * var(--kp-gutter));
    padding-block-start: clamp(1rem, 0.6rem + 1.5vw, 2rem);
  }

  .kp-tool--result .kp-tool__container {
    max-width: calc(56rem + 2 * var(--kp-gutter));
  }

  .kp-tool__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    padding-block-start: var(--kp-space-4);
  }

  .kp-tool__head h1 {
    font-size: clamp(2rem, 1.6rem + 1.7vw, 3.125rem);
    line-height: var(--kp-display-leading);
    letter-spacing: var(--kp-display-tracking-tight);
    overflow-wrap: anywhere;
  }

  .kp-tool__question {
    display: block;
    margin-block-start: var(--kp-space-2);
    color: var(--kp-ink-2);
    font-size: 0.56em;
    line-height: var(--kp-heading-leading);
    letter-spacing: var(--kp-display-tracking);
  }

  .kp-tool__dek {
    color: var(--kp-ink-2);
    font-size: var(--kp-text-lead);
    line-height: var(--kp-body-leading);
  }

  .kp-tool__uses {
    color: var(--kp-brand-2);
    font-size: 0.9375rem;
    font-weight: 700;
  }

  .kp-tool__card {
    padding: clamp(1.25rem, 0.8rem + 1.9vw, 2.5rem);
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-card);
  }

  .kp-notice--alert {
    border: 1px solid var(--kp-border);
  }

  .kp-notice--alert .kp-notice__icon {
    background: var(--kp-error);
    color: #ffffff;
  }

  .kp-tool__about {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-4);
    padding-block-start: var(--kp-space-6);
  }

  .kp-tool__about > h2 {
    font-size: var(--kp-text-h3);
    line-height: var(--kp-heading-leading);
  }

  .kp-tool__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kp-space-2);
  }

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

  .kp-tool + .kp-tool-more,
  .kp-no-print > .kp-tool-more:first-child {
    padding-block-start: 0;
  }

  /* The paper sheet: a printable result, light in both themes (tokens.css) and as it prints */
  .kp-sheet {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-8);
    padding: clamp(1.25rem, 0.6rem + 2.7vw, 3rem);
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-bg);
    color: var(--kp-ink);
    box-shadow: var(--kp-shadow-1);
  }

  .kp-sheet__body {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-6);
    min-width: 0;
  }

  .kp-sheet__brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--kp-space-4);
    padding-block-start: var(--kp-space-6);
    border-block-start: 1px solid var(--kp-border);
    break-inside: avoid;
  }

  .kp-sheet__brand-app {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
  }

  .kp-sheet__brand-app > span {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.875rem;
    line-height: var(--kp-ui-leading);
  }

  .kp-sheet__brand-app strong {
    font-family: var(--kp-font-display);
    font-size: 1.0625rem;
    font-weight: 900;
  }

  .kp-sheet__brand-app span span {
    color: var(--kp-ink-2);
  }

  .kp-sheet .kp-sheet__brand-url {
    color: var(--kp-brand);
    font-weight: 700;
  }

  .kp-sheet__brand-qr {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    margin: 0;
    color: var(--kp-ink-2);
    font-size: 0.8125rem;
    font-weight: 700;
  }

  .kp-sheet__brand-qr .kp-qr__code {
    width: 4.5rem;
    height: 4.5rem;
  }

  .kp-sheet__brand-qr .kp-qr__code svg {
    width: 100%;
    height: 100%;
  }

  .kp-sheet__brand-qr figcaption {
    max-width: 8rem;
  }

  /* The pieces results share */
  .kp-result__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--kp-space-2);
    text-align: center;
  }

  .kp-result__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: var(--kp-alt);
    font-size: 2.25rem;
    line-height: 1;
  }

  .kp-result__head h2 {
    color: var(--kp-head);
    font-size: var(--kp-text-h3);
    line-height: var(--kp-heading-leading);
    overflow-wrap: anywhere;
  }

  .kp-result__kicker {
    color: var(--kp-muted);
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: var(--kp-label-tracking);
    text-transform: var(--kp-eyebrow-case);
  }

  .kp-result__subtitle {
    color: var(--kp-ink-2);
    font-size: 1rem;
  }

  /* The one figure a result is about */
  .kp-result__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--kp-space-2);
    padding: var(--kp-space-6);
    border-radius: var(--kp-radius-md);
    background: var(--kp-band);
    color: #ffffff;
    text-align: center;
    break-inside: avoid;
  }

  .kp-result__figure-label {
    color: rgb(255 255 255 / 0.82);
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: var(--kp-label-tracking);
    text-transform: var(--kp-eyebrow-case);
  }

  .kp-result__figure-value {
    font-family: var(--kp-font-display);
    font-size: var(--kp-text-stat);
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1;
  }

  .kp-result__figure--words .kp-result__figure-value {
    font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
    line-height: var(--kp-heading-leading);
    overflow-wrap: anywhere;
  }

  .kp-result__figure-value small {
    margin-inline-start: 0.25em;
    font-size: 0.4em;
    font-weight: 800;
  }

  .kp-result__figure-note {
    color: rgb(255 255 255 / 0.9);
    font-size: 0.9375rem;
  }

  /* Facts as label and value, as many to a row as fit (one on phones) */
  .kp-result__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: var(--kp-space-3);
    margin: 0;
  }

  .kp-result__stat {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-1);
    padding: var(--kp-space-4);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-alt);
    break-inside: avoid;
  }

  .kp-result__stat dt {
    color: var(--kp-ink-2);
    font-size: 0.8125rem;
    font-weight: 700;
  }

  .kp-result__stat dd {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  .kp-result__stat dd small {
    display: block;
    color: var(--kp-muted);
    font-size: 0.8125rem;
    font-weight: 600;
  }

  /* What the result was made from */
  .kp-result__summary {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    break-inside: avoid;
  }

  .kp-result__summary h3,
  .kp-result__section > h3 {
    color: var(--kp-head);
    font-size: 1.0625rem;
    line-height: var(--kp-title-leading);
  }

  .kp-result__summary dl {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--kp-space-2) var(--kp-space-4);
    margin: 0;
    font-size: 0.9375rem;
  }

  .kp-result__summary dt {
    color: var(--kp-ink-2);
  }

  .kp-result__summary dd {
    margin: 0;
    font-weight: 700;
  }

  .kp-result__section {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
  }

  .kp-result__section > p {
    color: var(--kp-ink-2);
    line-height: var(--kp-body-leading);
  }

  /* How a figure was worked out: each step, then the total */
  .kp-result__steps {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: var(--kp-space-2) var(--kp-space-5);
    border-radius: var(--kp-radius-md);
    background: var(--kp-alt);
    font-variant-numeric: tabular-nums;
    break-inside: avoid;
  }

  .kp-result__steps > div {
    display: flex;
    justify-content: space-between;
    gap: var(--kp-space-4);
    padding-block: var(--kp-space-2);
  }

  .kp-result__steps > div + div {
    border-block-start: 1px solid var(--kp-border);
  }

  .kp-result__steps dt {
    color: var(--kp-ink-2);
  }

  .kp-result__steps dd {
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
  }

  .kp-result__steps-total dt,
  .kp-result__steps-total dd {
    color: var(--kp-head);
    font-weight: 900;
  }

  /* A note set apart: the next size up, what to do while a puppy grows */
  .kp-result__callout {
    gap: var(--kp-space-2);
    padding: var(--kp-space-4) var(--kp-space-5);
    border-inline-start: 4px solid var(--kp-brand);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-alt);
    break-inside: avoid;
  }

  .kp-result__list {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    margin: 0;
    padding-inline-start: 1.25rem;
    color: var(--kp-ink-2);
    line-height: var(--kp-body-leading);
  }

  /* A disclaimer printed with the result, as a form's or a safety tool's */
  .kp-result__fine-print {
    padding-block-start: var(--kp-space-4);
    border-block-start: 1px solid var(--kp-border);
    color: var(--kp-muted);
    font-size: 0.8125rem;
    line-height: var(--kp-body-leading);
  }

  /* Status as a tinted pill; the tones are the result's own, not the theme's */
  .kp-result__status {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: var(--kp-radius-pill);
    background: #e7f5eb;
    color: #21633a;
    font-size: 0.875rem;
    font-weight: 800;
  }

  .kp-result__status--low {
    background: #fff6cc;
    color: #7a5900;
  }

  .kp-result__status--high {
    background: #e5f1fc;
    color: #195a91;
  }

  /* The notes under a result, on screen only: tips and the disclaimer */
  .kp-result-tips {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    padding: var(--kp-space-6);
    border-radius: var(--kp-radius-md);
    background: var(--kp-alt);
  }

  .kp-result-tips h2 {
    font-size: 1.25rem;
    line-height: var(--kp-title-leading);
  }

  .kp-result-tips ul {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kp-result-tips li {
    position: relative;
    padding-inline-start: 1.5rem;
    color: var(--kp-ink-2);
    line-height: var(--kp-body-leading);
  }

  .kp-result-tips li::before {
    content: "";
    position: absolute;
    inset-block-start: 0.6em;
    inset-inline-start: 0.25rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--kp-dot);
  }

  .kp-result-tips > p {
    color: var(--kp-ink-2);
    font-size: 0.9375rem;
    line-height: var(--kp-body-leading);
  }

  .kp-result-tips--warning {
    border: 1px solid var(--kp-border);
    background: var(--kp-card);
  }

  .kp-result-tips--warning li::before {
    background: var(--kp-error);
  }

  .kp-result-disclaimer {
    color: var(--kp-muted);
    font-size: 0.875rem;
    line-height: var(--kp-body-leading);
  }

  /* A model tool's result being written, and a failed one */
  .kp-tool-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--kp-space-4);
    padding: clamp(2rem, 1.2rem + 3.4vw, 4rem) var(--kp-space-6);
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-lg);
    background: var(--kp-card);
    text-align: center;
  }

  .kp-tool-status h2 {
    font-size: var(--kp-text-h3);
    line-height: var(--kp-heading-leading);
  }

  .kp-tool-status > p {
    max-width: 32rem;
    color: var(--kp-ink-2);
    line-height: var(--kp-body-leading);
  }

  .kp-tool-status__spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--kp-alt-2);
    border-block-start-color: var(--kp-brand);
    border-radius: 50%;
    animation: kp-spin 900ms linear infinite;
  }

  @media (prefers-reduced-motion: reduce) {
    .kp-tool-status__spinner {
      animation-duration: 3s;
    }
  }

  @keyframes kp-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .kp-tool-status__steps {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: start;
  }

  .kp-tool-status__steps li {
    display: flex;
    align-items: center;
    gap: var(--kp-space-3);
    color: var(--kp-muted);
    font-weight: 700;
  }

  .kp-tool-status__steps li span {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--kp-alt);
    font-size: 0.875rem;
  }

  .kp-tool-status__steps [aria-current] {
    color: var(--kp-ink);
  }

  .kp-tool-status__steps [aria-current] span {
    background: var(--kp-brand);
    color: var(--kp-btn-ink);
  }

  .kp-tool-status__note {
    color: var(--kp-muted);
    font-size: 0.875rem;
  }

  .kp-tool-status__error {
    color: var(--kp-error);
    font-weight: 700;
  }

  .kp-tool-status__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--kp-alt);
    color: var(--kp-error);
  }

  .kp-tool-status .kp-tool__actions {
    justify-content: center;
  }

  /* A table in a result: it scrolls sideways inside the sheet on a phone, never the page */
  .kp-result__table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
  }

  .kp-result__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
  }

  .kp-result__table th,
  .kp-result__table td {
    padding: var(--kp-space-2) var(--kp-space-3);
    border-block-end: 1px solid var(--kp-border);
    text-align: start;
    vertical-align: top;
  }

  .kp-result__table thead th {
    background: var(--kp-alt);
    color: var(--kp-ink-2);
    font-size: 0.8125rem;
    font-weight: 800;
    white-space: nowrap;
  }

  .kp-result__table tbody th {
    font-weight: 700;
  }

  .kp-result__table small {
    color: var(--kp-muted);
    font-size: 0.8125rem;
    font-weight: 500;
  }

  .kp-result__table tbody tr:last-child > * {
    border-block-end: 0;
  }

  .kp-result__table tr {
    break-inside: avoid;
  }

  /* A checklist: a box to tick per item, on paper or on screen */
  .kp-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--kp-space-5);
  }

  .kp-checklist__group {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    break-inside: avoid;
  }

  .kp-checklist__group h3 {
    color: var(--kp-head);
    font-size: 1.0625rem;
    line-height: var(--kp-body-leading);
  }

  .kp-checklist__items {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kp-checklist__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--kp-space-3);
    break-inside: avoid;
  }

  .kp-checklist__line {
    display: flex;
    align-items: flex-start;
    gap: var(--kp-space-3);
    min-width: 0;
  }

  .kp-checklist--tickable .kp-checklist__line {
    cursor: pointer;
  }

  .kp-checklist__box,
  .kp-checklist__input {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.1em 0 0;
    border: 2px solid var(--kp-border-2);
    border-radius: 0.375rem;
    background: #ffffff;
  }

  .kp-checklist__input {
    display: grid;
    place-content: center;
    appearance: none;
    cursor: pointer;
  }

  .kp-checklist__input::before {
    content: "";
    width: 0.625rem;
    height: 0.375rem;
    margin-block-start: -0.125rem;
    border-block-end: 2.5px solid #ffffff;
    border-inline-start: 2.5px solid #ffffff;
    transform: rotate(-45deg) scale(0);
    transition: transform var(--kp-duration) var(--kp-ease);
  }

  /* A tick is for the screen: on paper every box prints empty, to tick with a pen */
  @media screen {
    .kp-checklist__input:checked {
      border-color: var(--kp-brand);
      background: var(--kp-brand);
    }

    .kp-checklist__input:checked::before {
      transform: rotate(-45deg) scale(1);
    }

    .kp-checklist__item:has(:checked) .kp-checklist__text,
    .kp-schedule__item:has(:checked) .kp-schedule__text {
      color: var(--kp-muted);
      text-decoration: line-through;
    }
  }

  .kp-checklist__input:focus-visible {
    outline: 3px solid var(--kp-focus);
    outline-offset: 2px;
  }

  .kp-checklist__text {
    display: flex;
    flex-direction: column;
    color: var(--kp-ink);
    font-size: 0.9375rem;
    line-height: var(--kp-body-leading);
    overflow-wrap: anywhere;
  }

  .kp-checklist__text small {
    color: var(--kp-muted);
    font-size: 0.8125rem;
  }

  .kp-checklist__badge {
    flex-shrink: 0;
    padding: 0.125rem 0.5rem;
    border-radius: var(--kp-radius-pill);
    background: var(--kp-alt);
    color: var(--kp-ink-2);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
  }

  .kp-checklist__badge--high {
    background: #fde8e6;
    color: #8c1d18;
  }

  .kp-checklist__badge--good {
    background: #e7f5eb;
    color: #21633a;
  }

  .kp-checklist__badge--mid {
    background: #fff6cc;
    color: #7a5900;
  }

  .kp-checklist__tip {
    padding: var(--kp-space-3) var(--kp-space-4);
    border-radius: var(--kp-radius-sm);
    background: var(--kp-alt);
    color: var(--kp-ink-2);
    font-size: 0.875rem;
    line-height: var(--kp-body-leading);
  }

  /* A sheet's section of label and value pairs; an empty value is a line to write on */
  .kp-sheet-fields {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-3);
    break-inside: avoid;
  }

  /* Line boxes tall enough for the emoji, which otherwise reach above them, past a printed page's edge */
  .kp-sheet-fields h3 {
    padding-block-end: var(--kp-space-2);
    border-block-end: 2px solid var(--kp-border);
    color: var(--kp-head);
    font-size: 1.0625rem;
    line-height: var(--kp-body-leading);
  }

  .kp-sheet-fields dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    gap: var(--kp-space-3) var(--kp-space-5);
    margin: 0;
  }

  .kp-sheet-fields__item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
  }

  .kp-sheet-fields__item--wide {
    grid-column: 1 / -1;
  }

  .kp-sheet-fields dt {
    color: var(--kp-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: var(--kp-label-tracking);
    text-transform: var(--kp-eyebrow-case);
  }

  .kp-sheet-fields dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: var(--kp-body-leading);
    overflow-wrap: anywhere;
    white-space: pre-line;
  }

  .kp-sheet-fields__item--alert dd {
    color: var(--kp-error);
    font-weight: 800;
  }

  .kp-sheet-fields__blank {
    display: block;
    height: 1.5rem;
    border-block-end: 1px solid var(--kp-border-2);
  }

  /* The lines a printed form is signed on */
  .kp-signatures {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-6);
    padding-block-start: var(--kp-space-4);
    break-inside: avoid;
  }

  .kp-signatures h3 {
    color: var(--kp-head);
    font-size: 1.0625rem;
  }

  .kp-signatures__row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: var(--kp-space-6);
  }

  .kp-signatures__field {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-1);
    color: var(--kp-muted);
    font-size: 0.8125rem;
    font-weight: 700;
  }

  .kp-signatures__line {
    display: block;
    height: 2.25rem;
    border-block-end: 1.5px solid var(--kp-ink);
  }

  /* A day's schedule: a time and what happens, a line each */
  .kp-schedule {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    list-style: none;
  }

  .kp-schedule__item {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--kp-space-3);
    padding: var(--kp-space-3) var(--kp-space-4);
    break-inside: avoid;
  }

  .kp-schedule__item + .kp-schedule__item {
    border-block-start: 1px solid var(--kp-border);
  }

  .kp-schedule__item--marked {
    background: var(--kp-alt);
  }

  .kp-schedule__time {
    color: var(--kp-head);
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    white-space: nowrap;
  }

  .kp-schedule__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    font-size: 0.9375rem;
    line-height: var(--kp-body-leading);
  }

  .kp-schedule__item--marked .kp-schedule__text {
    font-weight: 700;
  }

  .kp-schedule__text small {
    color: var(--kp-muted);
    font-size: 0.8125rem;
    font-weight: 500;
  }

  .kp-schedule__badge {
    padding: 0.125rem 0.5rem;
    border-radius: var(--kp-radius-pill);
    background: #e5f1fc;
    color: #195a91;
    font-size: 0.75rem;
    font-weight: 800;
  }

  @media (max-width: 30rem) {
    .kp-schedule__item {
      grid-template-columns: 5.25rem minmax(0, 1fr) auto;
      padding-inline: var(--kp-space-3);
    }
  }

  /* A letter or an agreement, set for reading and signing on paper (the model tools' results) */
  .kp-letter {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-4);
    max-width: 42rem;
    margin-inline: auto;
    color: var(--kp-ink);
    font-size: 1.0625rem;
    line-height: var(--kp-reading-leading);
  }

  .kp-letter__head {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-1);
    padding-block-end: var(--kp-space-4);
    border-block-end: 2px solid var(--kp-brand);
    text-align: center;
  }

  .kp-letter__head h2 {
    color: var(--kp-head);
    font-size: var(--kp-text-h3);
    line-height: var(--kp-heading-leading);
  }

  .kp-letter__head p {
    color: var(--kp-muted);
    font-size: 0.9375rem;
  }

  .kp-letter section {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-1);
    break-inside: avoid;
  }

  .kp-letter h3 {
    color: var(--kp-head);
    font-size: 1.0625rem;
    line-height: var(--kp-title-leading);
  }

  .kp-letter__signature {
    display: flex;
    flex-direction: column;
    gap: var(--kp-space-2);
    max-width: 18rem;
    margin-block-start: var(--kp-space-6);
    color: var(--kp-muted);
    font-size: 0.875rem;
    break-inside: avoid;
  }

  .kp-letter__line {
    display: block;
    height: 2.5rem;
    border-block-end: 1px solid var(--kp-ink);
  }
}
/*
 * Printing a page of the site (KID-1324), above all a tool's result: only the content, on white, at the paper's
 * width. The tokens are light in print (tokens.css keeps dark mode to the screen), so it needs no colors of its own.
 */

@layer utilities {
  @media print {
    @page {
      margin: 12mm;
      size: auto;
    }

    .kp-site {
      background: #ffffff;
    }

    .kp-header,
    .kp-footer,
    .kp-skip,
    .kp-get-bar,
    .kp-breadcrumb,
    .kp-no-print,
    .kp-band-section,
    #intercom-container,
    .intercom-lightweight-app {
      display: none !important;
    }

    .kp-container {
      max-width: none;
      padding-inline: 0;
    }

    .kp-tool {
      padding-block-end: 0;
    }

    .kp-tool__container {
      gap: var(--kp-space-4);
      padding-block-start: 0;
    }

    .kp-tool--result .kp-tool__head {
      display: none;
    }

    /* Paper takes smaller type than a screen (15px, about 11pt) and less air, so a short result fits on one page */
    html {
      font-size: 93.75%;
    }

    .kp-sheet {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: var(--kp-space-5);
      padding: 0;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }

    .kp-sheet__body {
      gap: var(--kp-space-4);
    }

    /* The app's mark, address and QR code head the printed sheet as a letterhead: at the foot, a result that nearly
       fills its page would push them onto a page of their own. A grid places them, since Chrome breaks the pages of a
       flex container reordered with `order` as if it were not */
    .kp-sheet__brand {
      grid-row: 1;
      padding-block: 0 var(--kp-space-4);
      border-block-start: 0;
      border-block-end: 1px solid var(--kp-border);
    }

    .kp-result__icon {
      width: 3.5rem;
      height: 3.5rem;
      font-size: 1.75rem;
    }

    .kp-result__figure {
      padding: var(--kp-space-4);
    }

    .kp-sheet,
    .kp-sheet * {
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }

    table,
    figure,
    img,
    svg {
      break-inside: avoid;
    }

    h2,
    h3 {
      break-after: avoid;
    }
  }
}
/*
 * The redesigned public site's stylesheet (KID-1324). Plain CSS, no vendor libraries: the tokens, a reset and the
 * elements' defaults, the layout, then the components. Every rule is in a cascade layer (tokens.css lists them).
 * A page's own styles that no other page needs are a stylesheet of their own (site_design.css).
 *






 */
