@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/MonaSans.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

/* mediakit.risksquad.io. Light first, like risksquad.io: tokens, type and controls follow the site's design
   tokens (proteus-landing src/styles/tokens.css). The build prepends the @font-face rules, with weight and
   width ranges read from the font files.

   Tracking: the kit serves the upstream Mona Sans release, which sets about 0.03em per glyph tighter than
   the build risksquad.io serves (measured in Chromium at weights 400-600). Every Mona Sans letter-spacing
   here is the site's value plus 0.03em, so the two pages read the same. */

:root {
  color-scheme: light;
  /* Text tokens hold at least 4.5:1 on --bg and --surface. */
  --bg: #f6f8f4;
  --surface: #ffffff;
  --ink: #0d1a12;
  --ink-2: #3b463f;
  --ink-3: #4f5a53;
  /* Secondary copy: 4.88:1 on white, 4.57:1 on --bg. */
  --ink-dim: #68746c;
  --line: rgba(13, 26, 18, 0.1);
  --line-2: rgba(13, 26, 18, 0.16);
  --line-3: rgba(13, 26, 18, 0.32);
  /* --apy fills buttons (white text 5.7:1), --apy-2 is the text green (7:1), --apy-strong hover and pressed. */
  --apy: #28743e;
  --apy-2: #22653a;
  --apy-strong: #174a2a;
  --apy-tint: #eaf3e3;
  /* The deep surface behind previews drawn for dark backgrounds: white reads 12:1 on it. */
  --forest: #123c2b;
  /* Paper and White as fixed values: the previews of files drawn for light backgrounds keep them in dark mode. */
  --paper: #f6f8f4;
  --paper-surface: #ffffff;
  --paper-ink-dim: #68746c;
  --selection: #d3ebbc;
  --header-bg: rgba(246, 248, 244, 0.86);
  --font-display: "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Mona Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --shell: 1440px;
  --gutter: 20px;
  --gap: 16px;
  --header-h: 108px;
  --radius: 22px;
  --radius-card: 28px;
  --section-pad: 96px;
  --shadow-tile: 0 1px 1px rgba(13, 26, 18, 0.04), 0 8px 24px -8px rgba(13, 26, 18, 0.16);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark: the page on an ink near Forest, cards one step lighter, Lime where the light page uses Text Green.
   Text tokens hold at least 4.5:1 on --bg and --surface here too. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1a12;
  --surface: #14271c;
  --ink: #f4f5f1;
  --ink-2: #cfd8d1;
  --ink-3: #b8c3bb;
  --ink-dim: #9aa89e;
  --line: rgba(244, 245, 241, 0.1);
  --line-2: rgba(244, 245, 241, 0.16);
  --line-3: rgba(244, 245, 241, 0.32);
  --apy-2: #a4e35a;
  --apy-strong: #2f8a4a;
  --apy-tint: rgba(164, 227, 90, 0.14);
  --selection: rgba(164, 227, 90, 0.35);
  --header-bg: rgba(12, 26, 18, 0.82);
  --shadow-tile: 0 1px 1px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
}

@media (min-width: 600px) {
  :root {
    --gutter: clamp(22px, 5.5vw, 88px);
    --gap: clamp(16px, 1.8vw, 24px);
    --section-pad: clamp(96px, 11vw, 168px);
  }
}

@media (min-width: 980px) {
  :root {
    --radius: 26px;
    --radius-card: 36px;
  }
}

/* Wide screens: the nine section links fit beside the lockup, the toggle and the download in one 72 px row. */
@media (min-width: 1700px) {
  :root {
    --header-h: 72px;
  }
}

@media (min-width: 1920px) {
  :root {
    --shell: 1680px;
  }
}

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

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.03em;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

/* Technical values are the only text set in mono, at the font's own spacing. */
code,
.size,
.dl__meta,
.swatch__values dt,
.specimen__sample--mono,
.rule .body em {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

::selection {
  background: var(--selection);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--apy-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  transform: translateY(-160%);
}

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

/* A quiet sentence-case label in the text green, never a shouted mono tag. */
.kicker {
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--apy-2);
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.04;
  text-wrap: balance;
}

/* Secondary voice in grey. */
.intro {
  max-width: 31em;
  font-size: clamp(1.1875rem, 1.55vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.016em;
  line-height: 1.38;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.body {
  line-height: 1.6;
  color: var(--ink-3);
  text-wrap: pretty;
}

.subhead {
  margin: clamp(56px, 6vw, 88px) 0 20px;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}

.card__label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.size {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-dim);
}

/* ---------- Buttons, chips and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--apy);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    transform 0.3s var(--ease-out);
}

.button:hover {
  background: var(--apy-strong);
}

.button:active {
  transform: scale(0.97);
}

/* Full white on the green: a dimmer tone would fall under 4.5:1. */
.button .dl__meta {
  color: #fff;
}

.button--ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-3);
}

.button--ghost:hover {
  background: var(--apy-tint);
  box-shadow: inset 0 0 0 1px var(--apy);
}

.button--ghost .dl__meta {
  color: var(--ink-3);
}

/* Chips: 36 px drawn, 44 px to touch (the ::after reaches into the 8 px gaps above and below). */
.dl,
.copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    color 0.2s;
}

.dl::after,
.copy::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}

.dl:hover,
.copy:hover {
  color: var(--apy-2);
  box-shadow: inset 0 0 0 1px var(--apy);
}

.dl__meta {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-3);
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy {
  flex: none;
  cursor: pointer;
}

.copy.is-copied {
  color: var(--apy-2);
  background: var(--apy-tint);
  box-shadow: inset 0 0 0 1px var(--apy);
}

a:not(.button, .dl, .brand, .skip-link):hover {
  color: var(--apy-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  padding-top: 8px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

/* The kit's own lockup: the file for light backgrounds, or for dark ones once the page is dark. */
.brand__lockup {
  width: 120px;
  height: auto;
}

.brand__lockup--dark,
:root[data-theme="dark"] .brand__lockup--light {
  display: none;
}

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

/* The theme toggle: a round button beside the download button, moon on the light page, sun on the dark one. */
.theme-toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  box-shadow: inset 0 0 0 1px var(--line-3);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--apy);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle__sun,
:root[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

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

.theme-toggle + .button--header {
  margin-left: 0;
}

.brand__kit {
  display: none;
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.button--header {
  margin-left: auto;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* Below 1700 px the section links take a second row that scrolls sideways on its own. */
.nav {
  order: 3;
  flex: 1 0 100%;
  margin: 4px calc(var(--gutter) * -1) 0;
  padding: 0 calc(var(--gutter) - 12px);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
}

.nav__list a {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.2s;
}

.nav__list a:hover {
  color: var(--apy-2);
  text-decoration: none;
}

/* The archive's size stays in the link's name; the narrowest phones show only "Download". */
@media (max-width: 379px) {
  .button__size {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (min-width: 600px) {
  .brand__lockup {
    width: 140px;
  }

  .brand__kit {
    display: inline;
  }

  .button--header {
    padding: 0 20px;
  }
}

@media (max-width: 1699px) {
  .button__wide {
    display: none;
  }
}

@media (min-width: 1700px) {
  .site-header__inner {
    flex-wrap: nowrap;
    gap: 20px;
    height: var(--header-h);
    padding-top: 0;
  }

  .brand__lockup {
    width: 152px;
  }

  .nav {
    order: 0;
    flex: none;
    margin: 0 0 0 auto;
    padding: 0;
    overflow: visible;
  }

  .button--header {
    margin-left: 4px;
  }
}

/* ---------- Hero ---------- */

.hero__inner {
  display: grid;
  justify-items: center;
  padding-block: clamp(56px, 8vw, 112px) 0;
  text-align: center;
}

.hero__title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 15vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 0.96;
}

.hero__title span,
.hero__title em {
  display: block;
}

.hero__title em {
  font-style: normal;
  color: var(--apy-2);
}

.hero__lead {
  max-width: 22em;
  margin-top: clamp(20px, 2.4vw, 32px);
}

/* The real mark, large, on White: the page's one picture of the brand. */
.hero__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(240px, 38vw, 520px);
  margin-top: clamp(40px, 5vw, 72px);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-tile);
}

/* Half the stage's height, on the same clamp, so the mark never depends on a percentage of an auto row. */
.hero__mark {
  width: auto;
  height: clamp(120px, 19vw, 260px);
}

.hero__mark--dark,
:root[data-theme="dark"] .hero__mark--light {
  display: none;
}

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

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 16px;
  width: 100%;
  max-width: 880px;
  margin-top: clamp(36px, 4vw, 56px);
}

/* The figure reads first, its label under it. */
.hero__stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}

.hero__stats dt {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-dim);
}

.hero__stats dd {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
}

@media (min-width: 680px) {
  .hero__stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ---------- Sections ---------- */

.sections {
  padding-bottom: var(--section-pad);
}

.section {
  padding-top: var(--section-pad);
}

.section__head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(36px, 4vw, 56px);
}

.grid {
  display: grid;
  gap: var(--gap);
}

.card {
  min-width: 0;
  border-radius: var(--radius);
  background: var(--surface);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.about__copy {
  display: grid;
  gap: var(--gap);
}

.copy-card {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 2.6vw, 36px);
}

.copy-card__text {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-wrap: pretty;
}

.facts {
  display: grid;
  gap: 12px;
  padding: clamp(24px, 2.6vw, 36px);
}

.facts dl {
  display: grid;
}

.facts dl div {
  display: grid;
  gap: 2px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.facts dt {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-dim);
}

.facts dd {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.facts dd a {
  color: var(--apy-2);
}

@media (min-width: 980px) {
  .about {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

/* ---------- Previews ---------- */

.preview {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(var(--radius) - 10px);
}

/* Each logo on the background its file is drawn for. */
.preview--light {
  background: var(--paper);
}

.preview--dark,
.preview--forest {
  background: var(--forest);
}

/* Renders fill the frame; a hairline above them keeps a Paper render's edge visible on a white card. */
.preview--frame {
  background: var(--paper);
}

.preview--frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}

.preview__img {
  width: 100%;
  height: auto;
}


/* ---------- Logo ---------- */

/* Fifteen files: one, two, then three columns, so the wide grid closes in five full rows. */
.grid--logos {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 600px) {
  .grid--logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .grid--logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.logo-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 10px 10px 22px;
}

/* Phones stack nine cards: a wider tile keeps the column short. */
.logo-card .preview {
  aspect-ratio: 2 / 1;
}

@media (min-width: 600px) {
  .logo-card .preview {
    aspect-ratio: 16 / 10;
  }
}

/* Sized by width, which always resolves: the lockup and the wordmark span most of the tile, the mark sits at about 40% of its height. */
.logo-card .preview img {
  width: 64%;
  height: auto;
}

.logo-card .preview--wordmark img {
  width: 50%;
}

.logo-card .preview--mark img {
  width: 22%;
}

.logo-card .preview--stacked img {
  width: 30%;
}

.logo-card .preview--badge img {
  width: 70%;
}

.logo-card .preview--tile img {
  width: 26%;
}

.logo-card__body {
  display: grid;
  gap: 14px;
  padding-inline: 12px;
}

.grid--avatars {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  max-width: 760px;
}

/* ---------- Loading ---------- */

/* Seven files: one, two, then four columns, so two rows close with one short. */
.grid--loading {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 600px) {
  .grid--loading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .grid--loading {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.loading-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 10px 10px 22px;
}

/* The primary previews side by side: black on Paper, white on Forest. */
.loading-card__previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.loading-card .preview {
  aspect-ratio: 1;
}

/* The animation plays at about a third of the tile: the size of a loader in a screen, not a hero. */
.loading-card .preview img {
  width: 40%;
  height: auto;
}

.loading-card__body {
  display: grid;
  gap: 12px;
  padding-inline: 12px;
}

.preview__img--avatar {
  aspect-ratio: 1;
}

.rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  margin-top: clamp(56px, 6vw, 88px);
}

.rule {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(24px, 2.6vw, 36px);
}

.rule .body em {
  font-style: normal;
  color: var(--apy-2);
}

.clearspace {
  margin-top: 16px;
  padding: clamp(16px, 3vw, 40px);
  border-radius: calc(var(--radius) - 10px);
  background: var(--paper);
}

.clearspace__svg {
  width: 100%;
  height: auto;
}

.minsize {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 40px;
  margin-top: 16px;
  padding: 40px 32px 28px;
  border-radius: calc(var(--radius) - 10px);
  background: var(--paper);
}

.minsize figure {
  display: grid;
  gap: 14px;
  justify-items: start;
}

/* The captions sit on the fixed Paper panel, so they keep Paper's ink in dark mode too. */
.minsize figcaption {
  color: var(--paper-ink-dim);
}

.minsize__mark {
  width: auto;
  height: 24px;
}

.minsize__lockup {
  width: 96px;
  height: auto;
}

@media (min-width: 980px) {
  .rules {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.donts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: var(--gap);
}

.dont {
  display: grid;
  gap: 12px;
}

.dont p {
  font-size: 0.95rem;
  color: var(--ink-2);
}

.dont__demo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--radius) - 6px);
  background: var(--paper-surface);
}

/* A red-free "no" mark: a diagonal rule across each example. */
.dont__demo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    rgba(13, 26, 18, 0.45) calc(50% - 1px),
    rgba(13, 26, 18, 0.45) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.dont__demo img {
  width: auto;
  height: 44%;
}

/* Recolored to orange: purple would read as critical severity, which the brand never uses. */
.dont__demo--recolor img {
  filter: hue-rotate(-80deg) saturate(1.4);
}

.dont__demo--stretch img {
  transform: scaleX(1.6);
}

.dont__demo--rotate img {
  transform: rotate(-24deg);
}

.dont__demo--effects img {
  filter: drop-shadow(6px 10px 6px rgba(13, 26, 18, 0.55));
}

.dont__demo--outline img {
  filter: drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink));
}

.dont__demo--busy {
  background: repeating-linear-gradient(45deg, #a4e35a 0 10px, #ffffff 10px 20px, #68746c 20px 30px);
}

/* ---------- Color ---------- */

.grid--swatches {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.swatch {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.swatch__chip {
  aspect-ratio: 2 / 1;
  margin: 10px 10px 0;
  border-radius: calc(var(--radius) - 10px);
}

@media (min-width: 600px) {
  .swatch__chip {
    aspect-ratio: 16 / 10;
  }
}

/* The light chips would vanish into the card: outline them. */
.swatch__chip--paper,
.swatch__chip--white {
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.swatch__chip--apysyk-green {
  background: #4da61d;
}

.swatch__chip--action-green {
  background: #28743e;
}

.swatch__chip--text-green {
  background: #22653a;
}

.swatch__chip--forest {
  background: #123c2b;
}

.swatch__chip--lime {
  background: #a4e35a;
}

.swatch__chip--paper {
  background: #f6f8f4;
}

.swatch__chip--white {
  background: #ffffff;
}

.swatch__chip--ink {
  background: #0d1a12;
}

/* The values sit on the card's bottom edge, so every row of swatches lines up whatever the role's length. */
.swatch__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 20px 14px;
}

.swatch__role {
  font-size: 0.92rem;
}

.swatch__values {
  display: grid;
  margin-top: auto;
  padding-top: 8px;
}

.swatch__values div {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  padding-block: 8px;
  border-top: 1px solid var(--line);
}

.swatch__values dt {
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.swatch__values dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.swatch__values code {
  font-size: 0.875rem;
}

/* ---------- Typography ---------- */

.type {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
}

.specimen {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 2.6vw, 40px);
}

.specimen__meta {
  display: grid;
  gap: 4px;
}

.specimen__sample {
  padding-block: 8px;
}

.specimen__sample--display {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9.4vw, 9rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.98;
  text-wrap: balance;
}

.specimen__sample--display em {
  font-style: normal;
  color: var(--apy-2);
}

.specimen__sample--text {
  max-width: 34em;
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  font-weight: 500;
  letter-spacing: 0.016em;
  line-height: 1.4;
  color: var(--ink-2);
}

.specimen__sample--glyphs {
  font-family: "Space Grotesk", var(--font-display);
  font-size: clamp(5rem, 9vw, 8rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.specimen__sample--mono {
  font-size: clamp(1.0625rem, 1.5vw, 1.375rem);
  line-height: 1.5;
  color: var(--apy-2);
}

.specimen__links {
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.type__credits {
  max-width: 60em;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.type__credits a,
.specimen__links a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 3px;
}

@media (min-width: 720px) {
  .type {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .specimen--mona {
    grid-column: 1 / -1;
  }
}

/* ---------- Banners and wallpapers ---------- */

.asset-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: 10px 10px 18px;
}

.asset-card .preview {
  align-self: start;
}

.asset-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: end;
  align-items: center;
  gap: 4px 12px;
  padding-inline: 10px;
}

.asset-card__body .size {
  grid-row: 2;
}

.asset-card__body .dl {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.grid--families {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.family-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
}

/* Artwork meets the card's edges at its own ratio: no paper mat and no cropped logo. */
.family-card .preview {
  align-self: start;
  border-radius: 0;
}

.family-card__body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(18px, 2.5vw, 30px);
}

.family-card__body .body {
  font-size: 0.9rem;
}

.family-card__downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 8px;
  margin-top: 6px;
}

.family-card__downloads li,
.family-card__download .dl__label {
  min-width: 0;
}

.family-card__download {
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 14px;
  white-space: normal;
}

.family-card__download .dl__meta {
  flex: none;
  font-size: 0.68rem;
}

.dl__detail {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-dim);
}

.family-card--wide {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .family-card--wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .family-card--wide .family-card__body {
    align-self: center;
  }
}

@media (min-width: 980px) {
  .grid--families {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wall-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  margin: clamp(56px, 6vw, 88px) 0 20px;
}

.section__head + .wall-group .wall-group__head {
  margin-top: 0;
}

.wall-group__head .subhead {
  margin: 0;
}

.wall-group__head .body {
  font-size: 0.95rem;
  color: var(--ink-dim);
}

.grid--walls {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .grid--walls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .grid--walls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wall-card {
  display: grid;
  gap: 18px;
  padding: 10px 10px 20px;
}

/* Portrait previews stay small: above the size list on the narrowest phones, beside it from 420 px. */
.wall-group--phone .preview,
.wall-group--tablet .preview {
  width: min(100%, 200px);
}

@media (min-width: 420px) {
  .wall-group--phone .preview,
  .wall-group--tablet .preview {
    width: auto;
  }

  .wall-group--phone .wall-card,
  .wall-group--tablet .wall-card {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    align-items: start;
  }
}

@media (min-width: 480px) {
  .wall-group--phone .wall-card {
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  }

  .wall-group--tablet .wall-card {
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
  }
}

.wall-card__body {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-inline: 10px;
}

.wall-group--phone .wall-card__body,
.wall-group--tablet .wall-card__body {
  padding-top: 10px;
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Downloads ---------- */

.zips {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
}

.zip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: clamp(22px, 2.4vw, 32px);
}

.zip__text {
  display: grid;
  gap: 6px;
}

.zip .size {
  margin-left: 6px;
}

.zip--main {
  padding-block: clamp(28px, 3.2vw, 44px);
}

.zip--main .card__title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.005em;
}

@media (min-width: 600px) {
  .zip--main .button {
    min-height: 50px;
    padding: 0 28px;
    font-size: 1.0625rem;
  }
}

@media (min-width: 800px) {
  .zips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zip--main {
    grid-column: 1 / -1;
  }

  .zip:not(.zip--main) {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
  }
}

/* ---------- Generator ---------- */

.generator {
  display: grid;
  gap: 20px;
  padding: clamp(16px, 2.5vw, 28px);
}

.generator__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

@media (min-width: 800px) {
  .generator__controls {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }
}

.generator__field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.generator__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}

/* The selects dress like the ghost buttons: the page's surface, a hairline, the page's type. */
.generator__select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 40px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-3);
  color: var(--ink);
  font: 500 0.95rem var(--font-text);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%), linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.generator__select:focus-visible {
  outline: 2px solid var(--apy);
  outline-offset: 2px;
}

.generator__actions {
  display: flex;
  gap: 10px;
}

.generator__actions .button[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* The stage takes the format's shape once something is generated; before that it is a short note. */
.generator__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  transition: opacity 0.2s var(--ease-out);
}

.generator__stage.is-busy {
  opacity: 0.5;
}

.generator__hint {
  max-width: 44ch;
  padding: 32px 16px;
  text-align: center;
  color: var(--paper-ink-dim);
}

.generator__preview {
  width: 100%;
  height: auto;
  box-shadow: 0 0 0 1px var(--line);
}

.generator__caption {
  min-height: 1.2em;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-dim);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 28px 44px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer a {
  color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
}
