/* styles/typography.css
 * Type roles from the canvas (coGvv, viewport type). Each role is a set of custom properties
 * (--t-<role>-size / -lh / -ls) that change at the D and W breakpoints, plus a .t-<role>
 * class. Bare h1..h5 take the heading roles. Fonts are self-hosted from /assets/fonts. */

/* Spline Sans is already hosted for the legacy css/ files; the same files serve the rebuild. */
/* Spline Sans latin-ext */
@font-face {
  font-family: "Spline Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/spline-sans-latin-ext.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;
}

/* Spline Sans latin */
@font-face {
  font-family: "Spline Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/spline-sans-latin.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;
}

/* Piazzolla latin-ext */
@font-face {
  font-family: Piazzolla;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/piazzolla-var-latin-ext.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;
}

/* Piazzolla latin */
@font-face {
  font-family: Piazzolla;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/piazzolla-var-latin.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;
}

/* Piazzolla ≠ (U+2260), which the Google Fonts subsets leave out. One glyph, cut from the
   same Piazzolla 2.005 variable font (wght 100-900, opsz 8-30) with fontTools subset. */
@font-face {
  font-family: Piazzolla;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/piazzolla-var-math.woff2") format("woff2");
  unicode-range: U+2260;
}

/* Piazzolla italic latin-ext */
@font-face {
  font-family: Piazzolla;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/piazzolla-var-italic-latin-ext.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;
}

/* Piazzolla italic latin */
@font-face {
  font-family: Piazzolla;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/piazzolla-var-italic-latin.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;
}

/* Spline Sans Mono latin-ext */
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/spline-sans-mono-latin-ext.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;
}

/* Spline Sans Mono latin */
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/spline-sans-mono-latin.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;
}

/* Caveat latin-ext */
@font-face {
  font-family: Caveat;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/caveat-latin-ext.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;
}

/* Caveat latin */
@font-face {
  font-family: Caveat;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/caveat-latin.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;
}

/* Lato latin 400: Slack's UI face, for Slack windows in transcribed product shots only */
@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lato-latin-400.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;
}

/* Lato latin 700: Slack's UI face, for Slack windows in transcribed product shots only */
@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/lato-latin-700.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;
}

/* Lato latin 900: Slack's UI face, for Slack windows in transcribed product shots only */
@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/lato-latin-900.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;
}

@layer typography {
  :root {
    /* Piazzolla draws at its default opsz (30) at every size, as the boards do */
    font-optical-sizing: none;

    --t-mega-size: 76px;
    --t-mega-lh: 0.95;
    --t-mega-ls: -0.025em;
    --t-display-xl-size: 64px;
    --t-display-xl-lh: 0.95;
    --t-display-xl-ls: -0.025em;
    --t-display-lg-size: 52px;
    --t-display-lg-lh: 0.95;
    --t-display-lg-ls: -0.02em;
    --t-display-md-size: 44px;
    --t-display-md-lh: 0.95;
    --t-display-md-ls: -0.02em;
    --t-display-sm-size: 40px;
    --t-display-sm-lh: 0.95;
    --t-display-sm-ls: -0.02em;
    --t-h1-size: 36px;
    --t-h1-lh: 1.05;
    --t-h1-ls: -0.015em;
    --t-h2-size: 32px;
    --t-h2-lh: 1.05;
    --t-h2-ls: -0.015em;
    --t-h3-size: 28px;
    --t-h3-lh: 1.05;
    --t-h3-ls: -0.015em;
    --t-h4-size: 23px;
    --t-h4-lh: 1.05;
    --t-h4-ls: -0.01em;
    --t-h5-size: 20px;
    --t-h5-lh: 1.05;
    --t-h5-ls: -0.01em;
    --t-editorial-lg-size: 18px;
    --t-editorial-lg-lh: 1.5;
    --t-editorial-size: 17px;
    --t-editorial-lh: 1.6;
    --t-body-lg-size: 18px;
    --t-body-lg-lh: 1.5;
    --t-body-size: 17px;
    --t-body-lh: 1.6;
  }

  @media (min-width: 900px) {
    :root {
      --t-mega-size: 176px;
      --t-mega-ls: -0.035em;
      --t-display-xl-size: 120px;
      --t-display-xl-ls: -0.03em;
      --t-display-lg-size: 88px;
      --t-display-lg-ls: -0.025em;
      --t-display-md-size: 72px;
      --t-display-md-ls: -0.025em;
      --t-display-sm-size: 64px;
      --t-display-sm-ls: -0.025em;
      --t-h1-size: 56px;
      --t-h1-ls: -0.02em;
      --t-h2-size: 48px;
      --t-h2-ls: -0.02em;
      --t-h3-size: 40px;
      --t-h3-ls: -0.02em;
      --t-h4-size: 32px;
      --t-h4-ls: -0.015em;
      --t-h5-size: 24px;
      --t-h5-ls: -0.01em;
      --t-editorial-lg-size: 20px;
      --t-editorial-size: 18px;
      --t-body-lg-size: 20px;
      --t-body-size: 18px;
    }
  }

  @media (min-width: 1680px) {
    :root {
      --t-mega-size: 300px;
      --t-mega-ls: -0.035em;
      --t-display-xl-size: 168px;
      --t-display-xl-ls: -0.035em;
      --t-display-lg-size: 120px;
      --t-display-lg-ls: -0.03em;
      --t-display-md-size: 96px;
      --t-display-md-ls: -0.03em;
      --t-display-sm-size: 78px;
      --t-display-sm-ls: -0.025em;
      --t-h1-size: 64px;
      --t-h1-ls: -0.025em;
      --t-h2-size: 56px;
      --t-h2-ls: -0.02em;
      --t-h3-size: 48px;
      --t-h3-ls: -0.02em;
      --t-h4-size: 40px;
      --t-h4-ls: -0.02em;
      --t-h5-size: 28px;
      --t-h5-ls: -0.015em;
      --t-editorial-lg-size: 20px;
      --t-editorial-size: 18px;
      --t-body-lg-size: 20px;
      --t-body-size: 18px;
    }
  }

  .t-mega {
    font-family: var(--font-display);
    font-size: var(--t-mega-size);
    font-weight: 600;
    line-height: var(--t-mega-lh);
    letter-spacing: var(--t-mega-ls);
  }

  .t-display-xl {
    font-family: var(--font-display);
    font-size: var(--t-display-xl-size);
    font-weight: 600;
    line-height: var(--t-display-xl-lh);
    letter-spacing: var(--t-display-xl-ls);
  }

  .t-display-lg {
    font-family: var(--font-display);
    font-size: var(--t-display-lg-size);
    font-weight: 600;
    line-height: var(--t-display-lg-lh);
    letter-spacing: var(--t-display-lg-ls);
  }

  .t-display-md {
    font-family: var(--font-display);
    font-size: var(--t-display-md-size);
    font-weight: 600;
    line-height: var(--t-display-md-lh);
    letter-spacing: var(--t-display-md-ls);
  }

  .t-display-sm {
    font-family: var(--font-display);
    font-size: var(--t-display-sm-size);
    font-weight: 600;
    line-height: var(--t-display-sm-lh);
    letter-spacing: var(--t-display-sm-ls);
  }

  .t-h1 {
    font-family: var(--font-display);
    font-size: var(--t-h1-size);
    font-weight: 600;
    line-height: var(--t-h1-lh);
    letter-spacing: var(--t-h1-ls);
  }

  .t-h2 {
    font-family: var(--font-display);
    font-size: var(--t-h2-size);
    font-weight: 600;
    line-height: var(--t-h2-lh);
    letter-spacing: var(--t-h2-ls);
  }

  .t-h3 {
    font-family: var(--font-display);
    font-size: var(--t-h3-size);
    font-weight: 600;
    line-height: var(--t-h3-lh);
    letter-spacing: var(--t-h3-ls);
  }

  .t-h4 {
    font-family: var(--font-display);
    font-size: var(--t-h4-size);
    font-weight: 600;
    line-height: var(--t-h4-lh);
    letter-spacing: var(--t-h4-ls);
  }

  .t-h5 {
    font-family: var(--font-display);
    font-size: var(--t-h5-size);
    font-weight: 600;
    line-height: var(--t-h5-lh);
    letter-spacing: var(--t-h5-ls);
  }

  .t-editorial-lg {
    font-family: var(--font-display);
    font-size: var(--t-editorial-lg-size);
    font-weight: 400;
    line-height: var(--t-editorial-lg-lh);
  }

  .t-editorial {
    font-family: var(--font-display);
    font-size: var(--t-editorial-size);
    font-weight: 400;
    line-height: var(--t-editorial-lh);
  }

  .t-body-lg {
    font-family: var(--font-body);
    font-size: var(--t-body-lg-size);
    font-weight: 400;
    line-height: var(--t-body-lg-lh);
  }

  .t-body {
    font-family: var(--font-body);
    font-size: var(--t-body-size);
    font-weight: 400;
    line-height: var(--t-body-lh);
  }

  .t-ui {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
  }

  .t-ui-sm {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
  }

  .t-label {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .t-micro {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
  }

  .t-mono {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
  }

  .t-mono-sm {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
  }

  .t-hand {
    font-family: var(--font-hand);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.1;
  }

  /* Defaults for unclassed elements */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--t-body-size);
    line-height: var(--t-body-lh);
    /* Inherited: list items, cells, captions and labels avoid a one-word last line too, as p
       does. Headings balance; a block that sets its own wrap keeps it. */
    text-wrap-style: pretty;
  }

  h1 {
    font-family: var(--font-display);
    font-size: var(--t-h1-size);
    font-weight: 600;
    line-height: var(--t-h1-lh);
    letter-spacing: var(--t-h1-ls);
    text-wrap: balance;
  }

  h2 {
    font-family: var(--font-display);
    font-size: var(--t-h2-size);
    font-weight: 600;
    line-height: var(--t-h2-lh);
    letter-spacing: var(--t-h2-ls);
    text-wrap: balance;
  }

  h3 {
    font-family: var(--font-display);
    font-size: var(--t-h3-size);
    font-weight: 600;
    line-height: var(--t-h3-lh);
    letter-spacing: var(--t-h3-ls);
    text-wrap: balance;
  }

  h4 {
    font-family: var(--font-display);
    font-size: var(--t-h4-size);
    font-weight: 600;
    line-height: var(--t-h4-lh);
    letter-spacing: var(--t-h4-ls);
    text-wrap: balance;
  }

  h5 {
    font-family: var(--font-display);
    font-size: var(--t-h5-size);
    font-weight: 600;
    line-height: var(--t-h5-lh);
    letter-spacing: var(--t-h5-ls);
    text-wrap: balance;
  }

  h6 {
    font-size: 15px;
    font-weight: 600;
  }

  p {
    text-wrap: pretty;
  }

  code,
  kbd,
  samp,
  pre {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
  }

  /* Inline code: the editorial board's inline mark (onajk, "code"): a mist chip 2px 6px with radius
     sm, mono at 0.9em of the running text, in ink. Bare <code> takes it in prose and on the SEO
     pages; page copy elsewhere marks commands, file names and tool names <code class="t-code">. */
  .t-code,
  .prose :not(pre) > code,
  .seo-page main :not(pre) > code {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--mist);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.9em;
    line-height: inherit;
    overflow-wrap: anywhere;
    box-decoration-break: clone;
  }

  small {
    font-size: 12px;
  }
}