/* 2026-10-25-14-10-13 */
/*
 * Kyberfex site styles. Plain CSS, no build step.
 *
 * The look (November 2026, design/redesign/): "a cursor editing binary". Ink and paper, and three
 * bright colours from the logo: cursor teal, bit pink and bit lime. Bricolage Grotesque for
 * headings and body text, Instrument Serif for emphasis and quotes, JetBrains Mono for labels.
 *
 * Themes: every colour token holds a light and a dark value with light-dark(). The page follows
 * the visitor's system setting (color-scheme: dark light), and the theme toggle pins one by
 * setting data-theme on <html>. Dark is designed first and is the fallback.
 *
 * Section styles (.band--*) re-colour everything inside them by redefining the colour tokens, so
 * components only ever use the tokens. Every text pair in both themes and every style is checked
 * by core/tests.py.
 *
 * Motion: slow and subtle, at the end of this file, and only when the visitor's system doesn't ask
 * for reduced motion. Hover and focus changes are instant.
 *
 * Breakpoints (custom properties can't be used in media queries): 40rem and 64rem.
 */

/* Fonts: the Latin subsets, self-hosted (see static/fonts/OFL.txt) */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.e4fb7cb2cabb.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin.9b8dd1ecf641.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic-latin.bc891bdd08ad.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  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;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.b636a65da4f0.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  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;
}

/* Tokens */

:root {
  color-scheme: dark light;

  /* Colour: light value first, then dark. Text pairs are checked by core/tests.py. */
  --color-bg: light-dark(#faf8f4, #0a0d12);
  --color-surface: light-dark(#ffffff, #121821);
  --color-text: light-dark(#0a0d12, #f3f0ea);
  --color-text-muted: light-dark(#4b5363, #aeb4c0);
  --color-border: light-dark(#d8d2c5, #262e3b);
  --color-link: light-dark(#08705f, #3de0c5);
  --color-link-hover: light-dark(#054f43, #8ff0df);
  --color-accent: light-dark(#3de0c5, #3de0c5);
  --color-accent-strong: light-dark(#7fead8, #8ff0df);
  --color-on-accent: light-dark(#04201b, #04201b);
  --color-focus: light-dark(#b3004b, #ffd166);
  --color-error: light-dark(#b3261e, #ff8a80);
  --color-disc: light-dark(#3de0c5, #3de0c5);
  --color-wordmark: light-dark(#c9c2b4, #3a4556);

  /* The logo's parts: the ring in the text colour, a pink 0, a teal cursor and a lime 1 */
  --color-logo: light-dark(#0a0d12, #f3f0ea);
  --color-logo-zero: light-dark(#c2185b, #ff8fb3);
  --color-logo-cursor: light-dark(#08705f, #3de0c5);
  --color-logo-one: light-dark(#4d7a00, #c6f25f);

  /* Brand colours, the same in both themes */
  --teal: #3de0c5;
  --teal-deep: #17806f;
  --teal-ink: #0f5f52;
  --pink: #ff8fb3;
  --pink-deep: #c2185b;
  --lime: #c6f25f;
  --lime-deep: #6f8f1f;
  --ink: #0a0d12;
  --ink-soft: #24313a;
  --paper: #f3f0ea;
  --quote-ink: #1c0b13;
  --quote-muted: #5a2238;
  --envelope: #2a1220;
  --code-bg: #070a0e;
  --gutter-bg: #0d1219;
  --code-line: #3a4556;
  --editor-border: #262e3b;
  --editor-muted: #aeb4c0;
  --editor-ghost: #2e3846;
  /* Dim text on the editor's ink that still reads at 4.5:1, such as the 0s still to come */
  --editor-dim: #7d8797;

  /* The darker edge under a button; none on the bright section styles */
  --color-accent-deep: var(--teal-deep);

  /* Type: self-hosted, with the system's own fonts while they load */
  --font-sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.1rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.7vw, 1.8rem);
  --step-3: clamp(2.25rem, 1.4rem + 2.8vw, 3.75rem);
  --step-4: clamp(2.5rem, 1.7rem + 3.6vw, 4.25rem);
  --step-5: clamp(2.75rem, 1.6rem + 5vw, 5rem);

  /* Space */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 6rem;

  /* Layout */
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --measure: 68ch;
  --radius-s: 0.5rem;
  --radius-m: 1.25rem;
  --radius-l: 1.75rem;
  --radius-xl: 2rem;
}

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

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

/* Browsers without light-dark() get the dark theme */
@supports not (color: light-dark(#000, #fff)) {
  :root {
    --color-bg: #0a0d12;
    --color-surface: #121821;
    --color-text: #f3f0ea;
    --color-text-muted: #aeb4c0;
    --color-border: #262e3b;
    --color-link: #3de0c5;
    --color-link-hover: #8ff0df;
    --color-accent: #3de0c5;
    --color-accent-strong: #8ff0df;
    --color-on-accent: #04201b;
    --color-focus: #ffd166;
    --color-error: #ff8a80;
    --color-disc: #3de0c5;
    --color-wordmark: #3a4556;
    --color-logo: #f3f0ea;
    --color-logo-zero: #ff8fb3;
    --color-logo-cursor: #3de0c5;
    --color-logo-one: #c6f25f;
  }
}

/* Base */

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
}

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

h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}

p,
li {
  max-width: var(--measure);
  text-wrap: pretty;
}

/* Emphasis in the brand's serif italic, a touch larger to match the sans-serif's height */
em,
i {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: 0;
}

strong,
b {
  font-weight: 700;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

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

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

::selection {
  background: var(--teal);
  color: #04201b;
}

code,
pre {
  font-family: var(--font-mono);
}

/* A small label in capitals, in the mono font */
.label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Layout */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Decorations that hang over a section's edge never make the page scroll sideways */
.site-main {
  flex: 1;
  padding-bottom: var(--space-3xl);
  overflow-x: clip;
}

.site-main:focus {
  outline: none;
}

.site-main > :first-child:not(.page-hero) {
  margin-top: var(--space-xl);
}

.site-main > * + * {
  margin-top: var(--space-2xl);
}

.flow > * + * {
  margin-top: var(--space-s);
}

/* Skip link: hidden until focused */

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -100%;
  z-index: 10;
  padding: var(--space-2xs) var(--space-s);
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-radius: var(--radius-s);
  font-weight: 700;
}

.skip-link:focus {
  top: var(--space-s);
}

/* Header */

.site-header {
  position: relative;
  z-index: 3;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  color: var(--color-text);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover {
  color: var(--color-text);
}

/* The logo in full colour: each part takes its own colour, through currentColor */
.logo {
  width: 44px;
  height: 44px;
  color: var(--color-logo);
}

.logo__zero {
  color: var(--color-logo-zero);
}

.logo__cursor {
  color: var(--color-logo-cursor);
}

.logo__one {
  color: var(--color-logo-one);
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  padding: 0;
  list-style: none;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  border-radius: 0.375rem;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav__list a:hover {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.site-nav__list a[aria-current="page"],
.site-nav__list .is-ancestor {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 0.2em;
  text-underline-offset: 0.45em;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--color-accent);
}

.theme-toggle[hidden] {
  display: none;
}

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

/* Shows the icon for the theme a click switches to */
.theme-toggle[data-current="dark"] .icon-moon,
.theme-toggle[data-current="light"] .icon-sun {
  display: none;
}

@media (max-width: 40rem) {
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .site-nav__list a {
    padding: 0 0.6rem;
  }

  .theme-toggle {
    margin-left: auto;
  }
}

/* Buttons: pills with a darker edge underneath, as if they could be pressed */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 1.75rem;
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-radius: 999px;
  box-shadow: 0 6px 0 0 var(--color-accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}

.button--secondary {
  background: transparent;
  color: var(--color-text);
  box-shadow: inset 0 0 0 2px var(--color-text);
}

.button--secondary:hover {
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
  color: var(--color-text);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

button.button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Windows' high contrast mode drops backgrounds and shadows, so there buttons get a border */
@media (forced-colors: active) {
  .button,
  button.button {
    border: 2px solid;
  }
}

/* Forms. Field borders use the muted text colour, which keeps 3:1 against every background. */

.field {
  display: grid;
  gap: var(--space-3xs);
  max-width: var(--measure);
}

.field label {
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: var(--space-2xs) var(--space-xs);
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-text-muted);
  border-radius: var(--radius-s);
  caret-color: var(--color-accent);
  font: inherit;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-link);
}

.field--error input,
.field--error textarea {
  border-color: var(--color-error);
}

.field__error {
  color: var(--color-error);
  font-weight: 700;
}

.form-errors {
  max-width: var(--measure);
  padding: var(--space-s) var(--space-m);
  background: var(--color-surface);
  border-left: 4px solid var(--color-error);
  border-radius: var(--radius-s);
}

.form-errors ul {
  padding-left: 1.25em;
}

/* The spam trap: off screen, and hidden from screen readers and the keyboard */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* After sending, the page opens at #contact-form, which can take focus there; it needs no outline */
#contact-form:focus {
  outline: none;
}

/* Page hero: the title and introduction at the top of a page, with an optional photo of Ash.
   The photos stop at the thighs, so the photo stands on the hero's bottom edge, in front of a
   teal disc ringed in the text colour, after the logo's ring. On phones it goes under the text. */

.page-hero {
  position: relative;
  border-bottom: 1px solid var(--color-border);
  overflow: clip;
}

.page-hero__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 3rem;
}

.page-hero__text {
  flex: 1.4 1 28rem;
  max-width: 44rem;
  align-self: center;
  padding-block: 3rem 5.5rem;
}

.page-hero__intro,
.hero__lead {
  max-width: 36rem;
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.page-hero__photo {
  position: relative;
  flex: 1 1 20rem;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 4rem;
}

.page-hero__photo::before {
  content: "";
  position: absolute;
  bottom: 3rem;
  left: 50%;
  width: min(80%, clamp(17.75rem, 37vw, 28rem));
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--color-disc);
  box-shadow:
    0 0 0 0.75rem var(--color-bg),
    0 0 0 1.6rem var(--color-text);
}

.page-hero__photo .photo {
  position: relative;
}

/* On phones the photo comes under the text, so the text needs less room below it */
@media (max-width: 56rem) {
  .page-hero__inner--photo .page-hero__text {
    padding-bottom: var(--space-l);
  }
}

.meta {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

/* Photos of Ash: decorative, beside text, never behind it. Each photo has its own shape, so the
   image keeps its proportions within a box: up to 22rem wide and 36rem tall, or 12rem by 19rem
   when small, standing on the bottom of the box. */

.photo {
  display: block;
  width: min(100%, 22rem);
}

/* The image's box is the full width, its height from the image's width and height attributes, so
   the space is kept before the image loads and nothing below it moves. */
.photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 36rem;
  object-fit: contain;
  object-position: bottom;
}

/* A fixed width, as it sits in a grid column sized to fit it */
.photo--small {
  width: 12rem;
  max-width: 100%;
}

.photo--small img {
  max-height: 19rem;
}

@media (max-width: 40rem) {
  .photo--large {
    width: min(80%, 16rem);
  }

  .photo--large img {
    max-height: 24rem;
  }

  .photo--small {
    width: 10rem;
  }

  .photo--small img {
    max-height: 15rem;
  }
}

/* Sections: a page's body, stacked */

.sections > * + * {
  margin-top: var(--space-2xl);
}

.section-intro {
  font-size: var(--step-1);
  color: var(--color-text-muted);
}

/* A section's heading, with a link beside it, such as to the whole portfolio */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-head__title {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* After a section's heading, room before what it introduces */
.sections * + :is(.card-grid, .price-list) {
  margin-top: 3.5rem;
}

/* Section styles. Each redefines the colour tokens, so everything inside takes the new colours.
   Plain sits on the page; on a section, the others fill the width behind it. The bright styles
   are the same in both themes, with ink text. */

.band {
  background: var(--color-band, transparent);
  color: var(--color-text);
}

.band--panel {
  --color-band: var(--color-surface);
  --color-card: var(--color-bg);
}

.band--paper {
  --color-band: #f3f0ea;
  --color-surface: #ffffff;
  --color-text: #0a0d12;
  --color-text-muted: #4b5363;
  --color-border: #d8d2c5;
  --color-link: #08705f;
  --color-link-hover: #054f43;
  --color-accent: #3de0c5;
  --color-accent-strong: #7fead8;
  --color-on-accent: #0a0d12;
  --color-focus: #b3004b;
  --color-error: #b3261e;
  /* Paper is light in both themes, so labels in the logo's colours take their light-theme shades */
  --color-logo: #0a0d12;
  --color-logo-zero: #c2185b;
  --color-logo-cursor: #08705f;
  --color-logo-one: #4d7a00;
}

/* On the bright styles, labels and drawings in the logo's colours turn ink, and buttons lose
   their darker edge */
:is(.band--teal, .band--pink, .band--lime) {
  --color-logo-zero: #0a0d12;
  --color-logo-cursor: #0a0d12;
  --color-logo-one: #0a0d12;
  --color-accent-deep: transparent;
}

.band--teal {
  --color-band: #3de0c5;
  --color-surface: #a6f2e5;
  --color-text: #0a0d12;
  --color-text-muted: #18332e;
  --color-border: #0a0d12;
  --color-link: #0a0d12;
  --color-link-hover: #263040;
  --color-accent: #0a0d12;
  --color-accent-strong: #263040;
  --color-on-accent: #3de0c5;
  --color-focus: #0a0d12;
  --color-error: #7a0a0a;
}

.band--pink {
  --color-band: #ff8fb3;
  --color-surface: #ffc6d8;
  --color-text: #1c0b13;
  --color-text-muted: #5a2238;
  --color-border: #0a0d12;
  --color-link: #0a0d12;
  --color-link-hover: #263040;
  --color-accent: #0a0d12;
  --color-accent-strong: #263040;
  --color-on-accent: #ff8fb3;
  --color-focus: #0a0d12;
  --color-error: #6b0000;
}

.band--lime {
  --color-band: #c6f25f;
  --color-surface: #e2f8ab;
  --color-text: #0a0d12;
  --color-text-muted: #2d3a0e;
  --color-border: #0a0d12;
  --color-link: #0a0d12;
  --color-link-hover: #263040;
  --color-accent: #0a0d12;
  --color-accent-strong: #263040;
  --color-on-accent: #c6f25f;
  --color-focus: #0a0d12;
  --color-error: #7a0a0a;
}

/* As in v5, a section with a heading has room above and below it, and two such sections meet
   with no gap, so coloured ones touch */
.sections > .band {
  padding-block: 5rem 7rem;
}

.sections > .band + .band {
  margin-top: 0;
}

.band--paper,
.band--panel {
  border-block: 1px solid var(--color-border);
}

/* Text and picture: side by side on wide screens, the picture under the text on phones */

.text-image {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.text-image__image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-m);
}

@media (min-width: 64rem) {
  .text-image {
    grid-template-columns: 1fr 1fr;
  }

  .text-image--left > :is(picture, .drawing) {
    order: -1;
  }
}

/* Price list and key facts */

.price-list,
.facts {
  display: grid;
  gap: var(--space-s);
  max-width: var(--measure);
}

.price-list__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 var(--space-m);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--color-border);
}

.price-list dt,
.price-list__price,
.facts dt {
  font-weight: 700;
}

.price-list__price {
  font-family: var(--font-mono);
}

.price-list__note {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.facts dt {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.facts__row {
  display: grid;
  gap: 0 var(--space-m);
}

@media (min-width: 40rem) {
  .facts__row {
    grid-template-columns: 10rem 1fr;
    align-items: baseline;
  }
}

/* Quote: in the serif, with a large opening mark */

.quote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.25rem);
  line-height: 1.28;
  text-wrap: pretty;
}

.quote blockquote::before {
  content: "\201C";
  display: block;
  height: 4rem;
  margin-bottom: 1.5rem;
  color: var(--color-link);
  font-size: 9rem;
  line-height: 0.7;
}

.quote figcaption {
  display: flex;
  flex-direction: column;
  width: fit-content;
  margin-top: var(--space-m);
  padding: 0.75rem 3rem 0 0;
  border-top: 2px solid var(--color-text);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.quote__name {
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
}

/* Code */

.code-block pre {
  overflow-x: auto;
  padding: var(--space-s) var(--space-m);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  font-size: var(--step--1);
  line-height: 1.5;
}

.code-block__language {
  margin-bottom: var(--space-3xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

/* Call to action: a rounded panel in its style's colour, with the name in binary as a faint
   texture fading in from the left, and room for a photo of Ash standing on its bottom edge */

.cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding: 3rem 2rem 0 3rem;
  border-radius: var(--radius-xl);
  overflow: clip;
}

.cta.band--plain {
  border: 1.5px solid var(--color-border);
}

.cta.band--teal {
  box-shadow: 0 0.75rem 0 0 var(--teal-deep);
}

.cta.band--pink {
  box-shadow: 0 0.75rem 0 0 var(--pink-deep);
}

.cta.band--lime {
  box-shadow: 0 0.75rem 0 0 var(--lime-deep);
}

.cta__texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0.16;
  mask-image: linear-gradient(to right, transparent 30%, #000000 85%);
  pointer-events: none;
}

.cta__text {
  position: relative;
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.cta__text > * + * {
  margin-top: 0;
}

.cta h2 {
  font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.cta .button-row {
  padding-top: 0.5rem;
}

.cta .photo {
  position: relative;
  flex: none;
  width: auto;
  margin-left: auto;
}

.cta .photo img {
  width: auto;
  height: 18rem;
  max-height: none;
}

@media (max-width: 40rem) {
  .cta {
    padding: 2rem 1.25rem 0 1.5rem;
  }

  .cta__text {
    padding-bottom: 2rem;
  }

  .cta .photo img {
    height: 14rem;
  }
}

/* Previews in the admin's block picker */

.block-preview {
  padding-block: var(--space-m);
}

.prose > * + :is(h2, h3) {
  margin-top: var(--space-l);
}

.prose :is(ul, ol) {
  padding-left: 1.25em;
}

.figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-m);
}

.figure figcaption {
  margin-top: var(--space-2xs);
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

/* Cards: on a linked card, the whole card is the link's click target */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-m);
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: none;
  background: var(--color-card, var(--color-surface));
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.card--link:hover {
  border-color: var(--color-link);
}

.card--link:focus-within {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.card__body {
  padding: var(--space-m) var(--space-m) var(--space-l);
}

.card__title {
  font-size: var(--step-2);
}

.card__title a {
  color: var(--color-text);
  text-decoration: none;
}

.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card__title a:focus-visible {
  outline: none;
}

.card--link:hover .card__title a {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

.card p {
  color: var(--color-text-muted);
}

/* Blog list */

.post-list {
  display: grid;
  gap: var(--space-l);
  padding: 0;
  list-style: none;
}

.post-list__item > * + * {
  margin-top: var(--space-2xs);
}

.post-list__title {
  font-size: var(--step-2);
}

.pagination {
  display: flex;
  gap: var(--space-m);
  margin-top: var(--space-xl);
}

.pagination [rel="next"] {
  margin-left: auto;
}

/* Notice for editors, such as on a hidden blog */

.notice {
  max-width: none;
  padding: var(--space-s) var(--space-m);
  background: var(--color-surface);
  border-left: 4px solid var(--color-focus);
  border-radius: var(--radius-s);
}

/* Footer: the brand and contact details, the name in binary, and the name again, large and
   outlined, with the cursor after it. A dashed line along the top, where a new block would go. */

.site-footer {
  padding-block: 0 3rem;
  font-size: 1rem;
  overflow: clip;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 2.5rem;
  padding-top: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .brand {
  font-size: 1.25rem;
}

.footer-brand .logo {
  width: 36px;
  height: 36px;
}

.site-footer__legal {
  max-width: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.signature {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.75rem;
  margin-top: 3.5rem;
  padding: 0;
  list-style: none;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: center;
}

.signature li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.signature__letter {
  font-size: 1.125rem;
  font-weight: 800;
}

.signature li:nth-child(3n + 1) .signature__letter {
  color: var(--color-logo-cursor);
}

.signature li:nth-child(3n + 2) .signature__letter {
  color: var(--color-logo-zero);
}

.signature li:nth-child(3n) .signature__letter {
  color: var(--color-logo-one);
}

.wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.04em;
  max-width: none;
  margin-top: 2.5rem;
  font-size: clamp(4.5rem, 1.5rem + 12vw, 14rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px var(--color-wordmark);
  user-select: none;
}

.wordmark .cursor {
  flex: none;
  width: 0.38em;
  height: 0.92em;
  color: var(--color-logo-cursor);
}

/* Contact details: in the footer and on the contact page */

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.contact-details dt {
  color: var(--color-link);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-details dd {
  color: var(--color-text-muted);
}

.contact-details__note {
  color: var(--color-text-muted);
}

address {
  font-style: normal;
}

/* Utilities */

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

/* ===== The brand's motifs: choices editors make on any page ===== */
/* Ported from home page v5's own code (design/redesign/source/home-v5/), not from pictures of it */

/* Shared drawings: the name in binary as a texture, in ink and in pink, for any section to fill
   a box with (includes/svg_defs.html) */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.svg-defs text,
.bits-pattern text {
  font-family: var(--font-mono);
}

/* Highlight: words that matter, as if selected */

mark {
  padding: 0 0.12em;
  border-radius: 0.1em;
  background: var(--color-accent);
  color: var(--color-on-accent);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* The home page's heading: the highlight in the serif, with the cursor after it and the
   formatting bar above it */
.hero-mark {
  position: relative;
  display: table;
  margin-top: max(0.8em, 3.75rem);
  padding: 0.02em 0.16em 0.08em;
  border-radius: 0.12em;
  background: var(--teal);
  color: #04201b;
  font-family: var(--font-serif);
  font-size: 1.12em;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero-mark > .cursor {
  position: absolute;
  right: -0.24em;
  bottom: -0.32em;
  width: 0.42em;
  height: 1.02em;
  color: var(--pink);
  filter: drop-shadow(0.06em 0.06em 0 var(--color-bg));
}

.format-bar {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.6rem);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: 0.875rem;
  background: var(--color-surface);
  box-shadow: 0 0.5rem 0 0 rgb(0 0 0 / 0.45);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
}

.format-bar__key {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  font-weight: 800;
}

.format-bar__key--italic {
  background: var(--color-border);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 400;
}

.format-bar__key svg {
  width: 18px;
  height: 18px;
}

.format-bar__rule {
  width: 1px;
  height: 1.5rem;
  margin: 0 0.25rem;
  background: var(--color-border);
}

.format-bar__swatch {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
}

.format-bar__swatch--teal {
  margin: 0 0.3rem;
  background: var(--teal);
  box-shadow:
    0 0 0 2px var(--color-surface),
    0 0 0 4px var(--teal);
}

.format-bar__swatch--pink {
  background: var(--pink);
}

.format-bar__swatch--lime {
  margin: 0 0.4rem 0 0.25rem;
  background: var(--lime);
}



/* Section numbers: a page can count its sections in binary, 0b01, 0b10, 0b11, with the number
   large and outlined behind the section. The counter style writes numbers in 0s and 1s. */

@counter-style binary {
  system: numeric;
  symbols: "0" "1";
  pad: 2 "0";
}

.sections--numbered {
  counter-reset: section;
}

.sections--numbered > [data-number] {
  position: relative;
  counter-increment: section;
}

.section-number,
.section-number-big {
  display: none;
}

.sections--numbered .section-number {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-logo-zero);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* The labels take the logo's colours in turn: pink, teal, pink, lime */
.sections--numbered > :nth-child(4n + 2 of [data-number]) .section-number {
  color: var(--color-logo-cursor);
}

.sections--numbered > :nth-child(4n of [data-number]) .section-number {
  color: var(--color-logo-one);
}

.sections--numbered .section-number::before {
  content: "";
  width: 0.6rem;
  height: 1.4rem;
  background: currentColor;
  mask: url("../images/cursor.57b9b2697c41.svg") center / contain no-repeat;
}

.sections--numbered .section-number::after {
  content: "0b" counter(section, binary);
}

.sections--numbered .section-number-big {
  display: block;
  position: absolute;
  top: -1.5rem;
  right: clamp(1rem, 4vw, 3rem);
  color: transparent;
  font-family: var(--font-mono);
  font-size: clamp(8rem, 4rem + 10vw, 17rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  -webkit-text-stroke: 2px var(--color-border);
  pointer-events: none;
  user-select: none;
}

.sections--numbered > .band:not(.band--plain) > .section-number-big {
  top: 2rem;
}

.sections--numbered .section-number-big::after {
  content: counter(section, binary);
}

.sections--numbered > [data-number] > .container {
  position: relative;
  z-index: 1;
}

/* Edges: how a section meets the one above it */

/* A curve drawn with the pen tool, in the gap above: the section rises to it. The knobs and the
   anchor are placed in the page, so they stay round however wide the curve stretches. */
.sections > .join--pen,
.sections > .band + .band.join--pen {
  margin-top: 6rem;
}

.join-pen {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  width: 100%;
  height: 6rem;
  color: var(--color-band, transparent);
  pointer-events: none;
}

/* The curve stretches with the section; the nib keeps its shape, at the outgoing handle */
.join-pen__curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
}

.join-pen__fill {
  fill: currentColor;
}

.join-pen__line,
.join-pen__handle {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.join-pen__line {
  stroke: var(--teal);
  stroke-width: 2.5;
}

.join-pen__handle {
  stroke: var(--pink);
  stroke-width: 1.5;
}

.join-pen__knob {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--pink);
}

.join-pen__knob--in {
  left: 33.333%;
  top: 18px;
}

.join-pen__knob--out {
  left: 66.667%;
  top: 94px;
}

.join-pen__anchor {
  position: absolute;
  left: 50%;
  top: 56px;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border: 2px solid var(--color-bg);
  background: var(--teal);
}

.join-pen__tool {
  position: absolute;
  left: calc(66.667% - 0.48rem);
  top: calc(94px - 0.48rem);
  width: 2.25rem;
  height: 2.25rem;
  overflow: visible;
}

/* A stamp's perforations: a strip of the section's colour along its top, with half-circles
   bitten out of it, overlapping the section above so they show its colour; and a dashed line to
   cut along, with scissors */
.sections > .join--perforated {
  margin-top: 0;
}

.join--perforated::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 1.1rem;
  background: radial-gradient(circle at 50% 0, transparent 0.6rem, var(--color-band, transparent) calc(0.6rem + 1px)) 0 0 / 1.6rem 1.1rem repeat-x;
}

.join-perforation {
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  border-top: 2px dashed color-mix(in srgb, var(--color-text) 30%, transparent);
}

.join-perforation svg {
  position: absolute;
  left: clamp(1rem, 4vw, 3rem);
  top: -0.7rem;
  width: 1.4rem;
  height: 1.4rem;
  color: var(--color-text-muted);
}

/* The line where a new block would go: a dashed line between two rings, with a plus in the
   middle. Outlined, so it reads as part of the line, not as a button. */
.join-insert,
.footer-insert {
  display: flex;
  align-items: center;
  height: 3rem;
}

.join-insert {
  position: absolute;
  left: max(var(--gutter), calc((100% - var(--container)) / 2));
  right: max(var(--gutter), calc((100% - var(--container)) / 2));
  bottom: calc(100% + var(--space-2xl) / 2 - 1.5rem);
}

.insert__ring {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.insert__line {
  flex: 1;
  border-top: 2px dashed var(--teal);
}

.insert__plus {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2rem;
  height: 2rem;
  translate: -50% -50%;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: var(--color-bg);
  box-shadow: 0 0 0 0.5rem var(--color-bg);
}

.insert__plus::before,
.insert__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.8rem;
  height: 2px;
  translate: -50% -50%;
  background: var(--teal);
}

.insert__plus::after {
  rotate: 90deg;
}

.footer-insert {
  position: relative;
}

/* A section that points down to the next one: its bottom edge drawn like a curly brace */
.band--pointer {
  position: relative;
  padding-bottom: 3rem;
}

.sections > .band--pointer:not(.band--plain) {
  padding-bottom: 3rem;
}

.pointer-edge {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  width: 100%;
  height: 5rem;
  max-width: none;
  color: var(--color-band);
  pointer-events: none;
}

.pointer-edge path {
  fill: currentColor;
}

.sections > .band--pointer + * {
  margin-top: 8rem;
}

/* Ribbons: two crossing bands, the editor's text in binary on pink and their words on teal. The
   same colours in both themes. Each track is a row of identical pieces, which all drift by their
   own width together, so the row loops without a seam. They move as pieces, not as one long
   strip, because Firefox hands an animation to its compositor, which moves it smoothly, only when
   the element is narrow enough: a strip thousands of pixels wide it moves a whole pixel at a
   time. And they move with a pixel of depth, like the logo's bobbing 0 and 1: Firefox lines inline
   SVG, such as the cursors between the words, up on whole pixels unless the move is 3D.
   kyberfex.js times the pieces from the editor's speed in pixels per second, and adds pieces to
   fill a wide screen; without it, a loop takes --drift. */

.ribbons {
  --drift: 65s;
  position: relative;
  height: 12rem;
  overflow: clip;
}

.site-main > .page-hero + .sections > .ribbons:first-child {
  margin-top: calc(-1 * var(--space-2xl));
}

.ribbon {
  position: absolute;
  left: -5%;
  width: 110%;
  overflow: hidden;
}

.ribbon__track,
.ribbon__piece {
  display: flex;
  align-items: center;
  width: max-content;
  white-space: nowrap;
}

.ribbon .cursor {
  flex: none;
}

.ribbon--bits {
  top: 3rem;
  rotate: 3deg;
  padding-block: 0.85rem;
  background: var(--pink);
  color: var(--quote-ink);
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

/* Spacing inside each half and after it, so the two halves are exactly the same width */
.ribbon--bits .ribbon__piece {
  gap: 1.5rem;
  padding-right: 1.5rem;
}

.ribbon--bits .cursor {
  width: 0.6rem;
  height: 1.4rem;
}

.ribbon--words {
  top: 4.25rem;
  rotate: -2deg;
  padding-block: 1rem;
  background: var(--teal);
  color: #04201b;
  box-shadow: 0 0.5rem 0 0 var(--teal-deep);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.ribbon--words .ribbon__piece {
  gap: 2rem;
  padding-right: 2rem;
}

.ribbon--words .cursor {
  width: 0.9rem;
  height: 2.2rem;
}

@media (max-width: 40rem) {
  .ribbon--words {
    font-size: 1.6rem;
  }

  .ribbon--words .cursor {
    height: 1.5rem;
  }
}

/* The home page's hero: the name in binary as a faint texture, a ring of bits turning around the
   disc, and the logo's 0 and 1 either side of the photo, now and then swapping places */

.page-hero--home {
  border-bottom: 0;
}

.page-hero--home h1 {
  font-size: clamp(2.6rem, 1.5rem + 3.6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.page-hero--home .page-hero__text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page-hero--home .page-hero__text > * + * {
  margin-top: 0;
}

.page-hero--home .button-row {
  gap: 1rem;
  padding-top: 0.5rem;
}

:is(.page-hero--home, .page-hero--portrait) .page-hero__photo {
  min-height: clamp(26rem, 45vw, 38rem);
}

:is(.page-hero--home, .page-hero--portrait) .page-hero__photo::before {
  display: none;
}

:is(.page-hero--home, .page-hero--portrait) .photo {
  width: auto;
}

:is(.page-hero--home, .page-hero--portrait) .photo img {
  width: auto;
  height: clamp(24rem, 50vw, 38rem);
  max-height: none;
}

.bits-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  color: var(--color-text);
  opacity: 0.08;
  pointer-events: none;
}

.page-hero > .bits-pattern {
  mask-image: radial-gradient(ellipse 75% 85% at 72% 45%, #000000 15%, transparent 72%);
}

.orbit {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  width: min(80%, clamp(17.75rem, 37vw, 28rem));
  aspect-ratio: 1;
  translate: -50% 0;
  pointer-events: none;
}

.orbit__bits {
  position: absolute;
  left: -4.5rem;
  top: -4.5rem;
  width: calc(100% + 9rem);
  height: calc(100% + 9rem);
  max-width: none;
  overflow: visible;
  color: var(--color-text-muted);
}

.orbit__bits text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.3px;
}

.orbit__ring {
  position: absolute;
  inset: -1.6rem;
  border: 0.85rem solid var(--color-text);
  border-radius: 50%;
}

.orbit__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-disc);
}

.orbit__digit {
  position: absolute;
  top: 50%;
  width: 5.3rem;
  height: 8rem;
  margin-top: -4rem;
}

.orbit__digit--left {
  left: -2.6rem;
}

.orbit__digit--right {
  right: -2.5rem;
}

.orbit__digit .digit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0.35rem 0.35rem 0 var(--color-bg));
}

.digit--zero {
  color: var(--color-logo-zero);
}

.digit--one {
  color: var(--color-logo-one);
}

/* The digit each side swaps to; hidden unless it moves */
.digit--later {
  transform: scaleY(0);
}

@media (max-width: 40rem) {
  :is(.page-hero--home, .page-hero--portrait) .page-hero__photo {
    min-height: 0;
  }

  .orbit__bits {
    left: -2.5rem;
    top: -2.5rem;
    width: calc(100% + 5rem);
    height: calc(100% + 5rem);
  }

  .orbit__digit {
    width: 3.3rem;
    height: 5rem;
    margin-top: -2.5rem;
  }

  .orbit__digit--left {
    left: -1.4rem;
  }

  .orbit__digit--right {
    right: -1.4rem;
  }
}

/* Card looks: each sets the card's colours, like a section style, and adds a picture of the
   work. The pictures, the selection frame and the cursors are decoration. */

.card-grid:has(.card--editor, .card--code, .card--switches) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 2.75rem 2.25rem;
}

:is(.card--editor, .card--code, .card--switches) {
  border: 0;
  border-radius: var(--radius-l);
  overflow: visible;
}

:is(.card--editor, .card--code, .card--switches) .card__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

:is(.card--editor, .card--code, .card--switches) .card__body > * + * {
  margin-top: 0;
}

/* The line in capitals sits at the foot of the card, underlined as v5 has it: the whole card
   takes the click, so it leads where it says */
:is(.card--editor, .card--code, .card--switches) .card__body > .card__more {
  margin-top: auto;
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

/* The selection frame: dashed, with a handle at each corner. Shown on the page being edited,
   and on the others when they're hovered. */
/* The page's text colour, kept for the frame round a card, outside the card's own colours */
.card-grid {
  --color-page-text: var(--color-text);
}

.card__selection {
  position: absolute;
  inset: -0.75rem;
  border: 2px dashed var(--color-page-text);
  border-radius: 0.5rem;
  opacity: 0;
  pointer-events: none;
}

.card-grid .card:hover > .card__selection,
.card--editor > .card__selection {
  opacity: 1;
}

.card__selection i {
  position: absolute;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid var(--color-page-text);
  background: var(--color-bg);
}

.card__selection i:nth-child(1) {
  top: -0.5rem;
  left: -0.5rem;
}

.card__selection i:nth-child(2) {
  top: -0.5rem;
  right: -0.5rem;
}

.card__selection i:nth-child(3) {
  bottom: -0.5rem;
  left: -0.5rem;
}

.card__selection i:nth-child(4) {
  right: -0.5rem;
  bottom: -0.5rem;
}

/* The frame's selection is someone's: a cursor with their name, at the frame's corner */
.card__editor-cursor {
  position: absolute;
  left: calc(100% + 0.4rem);
  top: calc(100% + 0.5rem);
  z-index: 2;
  display: flex;
  gap: 0.1rem;
  pointer-events: none;
}

.card__editor-cursor svg {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  overflow: visible;
}

@media (max-width: 80rem) {
  .card__editor-cursor {
    left: auto;
    right: -0.75rem;
    top: calc(100% + 0.6rem);
  }
}

.card__editor-cursor b {
  align-self: flex-start;
  margin-top: 1.55rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.125rem 0.5rem 0.5rem;
  background: var(--teal);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
}

.card__icon {
  display: inline-grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1.25rem;
}

.card__icon svg {
  width: 34px;
  height: 34px;
}

/* Where the card goes, in capitals, as v5 has it. The card's title is the link. */
.card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  margin-top: auto;
  color: var(--color-link);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-art b,
.card-art i {
  display: block;
  font-style: normal;
}

/* A page being edited: paper, across the row, the words beside a picture of the page */
.card--editor {
  --color-card: #f3f0ea;
  --color-text: #0a0d12;
  --color-text-muted: #24313a;
  --color-link: #0f5f52;
  --color-link-hover: #0a0d12;
  --color-focus: #b3004b;
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem 3.5rem;
  padding: clamp(1.75rem, 3vw, 3rem);
  color: var(--color-text);
}

/* In the light theme, paper needs an edge to stand off the page */
:root[data-theme="light"] .card--editor {
  box-shadow: 0 0 0 1.5px #d8d2c5;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .card--editor {
    box-shadow: 0 0 0 1.5px #d8d2c5;
  }
}

.card--editor .card__body {
  flex: 1 1 20rem;
  padding: 0;
}

.card--editor .card__icon {
  background: var(--teal);
  color: var(--ink);
  rotate: -6deg;
}

.card--editor .card__title {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 2rem + 2vw, 3.75rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.card--editor .card__title .cursor {
  flex: none;
  width: 0.42em;
  height: 1em;
  color: var(--teal-ink);
}

.card--editor .card__body p {
  max-width: 30rem;
  font-size: 1.25rem;
}

.card-art--editor {
  position: relative;
  flex: 1.3 1 22rem;
  padding: 1.5rem 1.5rem 0.75rem 0;
}

.mock {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
  border-radius: 1.25rem;
  background: var(--ink);
  box-shadow: 0 0.875rem 0 0 var(--teal);
}

.mock .mock__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0.375rem;
}

.mock .mock__dot {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--paper);
  border-radius: 50%;
}

.mock .mock__title {
  width: 3.5rem;
  height: 0.45rem;
  border-radius: 0.3rem;
  background: var(--paper);
}

.mock .mock__menu {
  display: flex;
  gap: 0.45rem;
  margin-left: auto;
}

.mock__menu b {
  width: 1.6rem;
  height: 0.35rem;
  border-radius: 0.3rem;
  background: #aeb4c0;
}

/* The selected block: outlined, with handles, a formatting bar above it */
.mock .mock__block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1rem 1rem;
  border-radius: 0.75rem;
  background: #121821;
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.mock .mock__heading {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mock__heading b {
  height: 0.85rem;
  border-radius: 0.3rem;
}

.mock__heading b:nth-child(1) {
  width: 42%;
  background: var(--paper);
}

.mock__heading b:nth-child(2) {
  width: 30%;
  background: var(--teal);
}

.mock__heading .cursor {
  flex: none;
  width: 0.5rem;
  height: 1.25rem;
  color: var(--pink);
}

.mock .mock__line {
  width: 72%;
  height: 0.45rem;
  border-radius: 0.3rem;
  background: #aeb4c0;
  opacity: 0.6;
}

.mock .mock__line--short {
  width: 56%;
}

.mock .mock__pill {
  width: 4.5rem;
  height: 1.4rem;
  margin-top: 0.3rem;
  border-radius: 999px;
  background: var(--teal);
}

.mock .mock__handle {
  position: absolute;
  width: 0.6rem;
  height: 0.6rem;
  border: 2px solid var(--teal);
  background: var(--ink);
}

.mock__handle:nth-of-type(1) {
  top: -0.5rem;
  left: -0.5rem;
}

.mock__handle:nth-of-type(2) {
  top: -0.5rem;
  right: -0.5rem;
}

.mock__handle:nth-of-type(3) {
  bottom: -0.5rem;
  left: -0.5rem;
}

.mock__handle:nth-of-type(4) {
  right: -0.5rem;
  bottom: -0.5rem;
}

.mock .mock__toolbar {
  position: absolute;
  top: -1.2rem;
  left: 38%;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0.25rem 0 0 rgb(0 0 0 / 0.35);
  line-height: 1;
}

.mock__toolbar b {
  font-size: 0.7rem;
  font-weight: 800;
}

.mock__toolbar i {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-style: italic;
}

.mock .mock__swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.mock .mock__swatch--teal {
  background: var(--teal);
}

.mock .mock__swatch--pink {
  background: var(--pink);
}

.mock .mock__swatch--lime {
  background: var(--lime);
}

.mock .mock__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.mock .mock__tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 3.6rem;
  padding: 0.6rem;
  border-radius: 0.6rem;
  background: #121821;
}

.mock__tile b {
  width: 80%;
  height: 0.3rem;
  border-radius: 0.3rem;
  background: #aeb4c0;
  opacity: 0.5;
}

.mock__tile b:nth-child(1) {
  width: 1.2rem;
  height: 0.35rem;
  opacity: 1;
}

.mock__tile b:nth-child(3) {
  width: 60%;
}

.mock__tile:nth-child(1) b:nth-child(1) {
  background: var(--teal);
}

.mock__tile:nth-child(2) b:nth-child(1) {
  background: var(--pink);
}

.mock__tile:nth-child(3) b:nth-child(1) {
  background: var(--lime);
}

.mock .mock__insert {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  border: 2px dashed var(--teal);
  border-radius: 0.75rem;
  color: var(--teal);
}

.mock__insert svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* A block being dragged to a new place, with the hand holding it */
.mock .mock__dragged {
  position: absolute;
  right: -1.25rem;
  bottom: 1.6rem;
  display: flex;
  gap: 0.5rem;
  width: 46%;
  padding: 0.7rem;
  border: 2px solid var(--pink);
  border-radius: 0.75rem;
  background: #121821;
  box-shadow: 0 1rem 1.5rem rgb(0 0 0 / 0.5);
  rotate: -4deg;
}

.mock__dragged > b {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.4rem;
  background: var(--pink);
  opacity: 0.85;
}

.mock .mock__dragged-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.25rem;
}

.mock__dragged-lines b {
  width: 80%;
  height: 0.45rem;
  border-radius: 0.3rem;
  background: var(--paper);
}

.mock__dragged-lines b + b {
  width: 58%;
  height: 0.3rem;
  background: #aeb4c0;
  opacity: 0.6;
}

.mock__hand {
  position: absolute;
  left: 52%;
  top: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  overflow: visible;
}

/* Code being changed: dark, with a pink edge and line numbers in binary */
.card--code {
  --color-card: #070a0e;
  --color-text: #f3f0ea;
  --color-text-muted: #aeb4c0;
  --color-link: #ff8fb3;
  --color-link-hover: #ffc6d8;
  --color-focus: #ffd166;
  border: 2px solid var(--pink);
  color: var(--color-text);
}

.card__gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3.75rem;
  padding: 2.4rem 0.75rem 0 0;
  overflow: hidden;
  border-right: 1px solid #262e3b;
  border-radius: 1.65rem 0 0 1.65rem;
  background: var(--gutter-bg);
  /* Lighter than v5's, so the numbers meet 4.5:1 */
  color: #7d8797;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.6rem;
  text-align: right;
}

.card__gutter b {
  display: block;
  font-weight: 400;
}

.card--code .card__body {
  flex: 1;
  padding: 2.25rem 2.25rem 2.25rem 5.5rem;
}

.card--code .card__icon {
  background: var(--pink);
  color: var(--ink);
  rotate: 5deg;
}

.card--code .card__title {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.card-art--code {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.1rem;
  border: 1px solid #262e3b;
  border-radius: 0.875rem;
  background: var(--gutter-bg);
}

.card-art .diff {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.diff b:not(.diff__sign) {
  height: 0.55rem;
  border-radius: 0.3rem;
  background: var(--paper);
}

.card-art .diff--indent {
  padding-left: 1.25rem;
}

.card-art .diff--removed,
.card-art .diff--added {
  gap: 0.5rem;
  margin: 0 -0.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.4rem;
}

.diff--removed {
  background: rgb(255 143 179 / 0.14);
}

.diff--added {
  background: rgb(198 242 95 / 0.12);
}

.diff__sign {
  width: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.diff--removed .diff__sign {
  color: var(--pink);
}

.diff--added .diff__sign {
  color: var(--lime);
}

.card-art .diff__bars {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0.75rem;
}

.diff .cursor {
  flex: none;
  width: 0.45rem;
  height: 1.1rem;
  margin-left: 0.1rem;
  color: var(--lime);
}

.diff .w1 {
  width: 1rem;
}

.diff .w16 {
  width: 1.6rem;
}

.diff .w2 {
  width: 2rem;
}

.diff .w24 {
  width: 2.4rem;
}

.diff .w25 {
  width: 2.5rem;
}

.diff .w3 {
  width: 3rem;
}

.diff .w325 {
  width: 3.25rem;
}

.diff .w35 {
  width: 3.5rem;
}

.diff .w45 {
  width: 4.5rem;
}

.diff .w55 {
  width: 5.5rem;
}

.diff b.pink {
  background: var(--pink);
}

.diff b.lime {
  background: var(--lime);
}

.diff b.teal {
  background: var(--teal);
}

.diff b.grey {
  background: #aeb4c0;
}

.diff .faint {
  opacity: 0.6;
}

/* Switches and a progress bar: lime, with a darker edge underneath and a pulse in the corner */
.card--switches {
  --color-card: #c6f25f;
  --color-text: #0a0d12;
  --color-text-muted: #24313a;
  --color-link: #0a0d12;
  --color-link-hover: #24313a;
  --color-focus: #0a0d12;
  color: var(--color-text);
  box-shadow: 0 0.75rem 0 0 var(--lime-deep);
}

.card--switches .card__body {
  flex: 1;
  padding: 2.25rem;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card--switches .card__icon {
  background: var(--ink);
  color: var(--lime);
  rotate: -4deg;
}

.pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--ink);
}

.pulse::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgb(198 242 95 / 0.25);
}

.pulse svg {
  width: 3rem;
  height: 1rem;
}

.card--switches .card__title {
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.card-art--switches {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgb(10 13 18 / 0.2);
  border-radius: 0.875rem;
  background: rgb(10 13 18 / 0.07);
}

.card-art .bit-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 2.25rem;
}

.bit-bars b {
  flex: 1;
  height: 92%;
  border-radius: 2px;
  background: var(--ink);
}

.bit-bars b:nth-child(3n) {
  height: 88%;
}

.bit-bars b:nth-child(3n + 1) {
  height: 95%;
}

.bit-bars b:nth-child(5n) {
  height: 97%;
}

.bit-bars b:nth-child(7n) {
  height: 86%;
}

.bit-bars b:nth-child(13) {
  height: 40%;
  opacity: 0.3;
}

.bit-bars b:last-child {
  height: 100%;
}

.card-art .bit-progress {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

.bit-progress .cursor {
  flex: none;
  width: 0.45rem;
  height: 1.1rem;
  margin: 0 0.1rem;
}

.card-art .bit-progress b {
  display: inline;
  opacity: 0.35;
}

.card-art .switches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.card-art .switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.switch svg {
  width: 1.1rem;
  height: 1.1rem;
}

.card-art .switch__track {
  position: relative;
  width: 2.6rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--ink);
}

.card-art .switch__knob {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
}

/* Project cards: each picture in a browser frame, the frames in turn teal, pink and lime, set
   down a little crooked; the second is lifted out of its place, as if being dragged */

/* auto-fill, so two projects keep a third of the row each, as v5's three do */
.card-grid--projects {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 2rem;
}

.project-card {
  position: relative;
  max-width: none;
  --frame: var(--teal);
}

.card-grid > .project-card:nth-child(3n + 2) {
  --frame: var(--pink);
}

.card-grid > .project-card:nth-child(3n) {
  --frame: var(--lime);
}

.card--project {
  gap: 1.25rem;
  height: 100%;
  padding: 0.75rem 0.75rem 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  background: var(--color-card, var(--color-bg));
  box-shadow: 0 0.875rem 0 -0.25rem var(--frame);
  overflow: visible;
}

.card-grid--projects > .project-card:nth-child(3n + 1) > .card--project {
  rotate: -1.5deg;
}

.card-grid--projects > .project-card:nth-child(3n) > .card--project {
  rotate: -0.75deg;
}

/* The lifted card, over a dashed outline of where it was */
.card-grid--projects > .project-card:nth-child(3n + 2)::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed var(--pink);
  border-radius: var(--radius-l);
  background: rgb(255 143 179 / 0.06);
}

.card-grid--projects > .project-card:nth-child(3n + 2) > .card--project {
  height: auto;
  translate: 1rem -0.75rem;
  rotate: 4deg;
  filter: drop-shadow(0 1.5rem 1.25rem rgb(0 0 0 / 0.55));
}

@media (max-width: 40rem) {
  .card-grid--projects > .project-card:nth-child(3n + 2) > .card--project {
    translate: 0 -0.5rem;
    rotate: 2deg;
  }
}

.card-grid--projects > .project-card > .card--project:hover {
  translate: 0 -8px;
  rotate: 0deg;
}

.frame {
  overflow: hidden;
  border: 2px solid var(--frame);
  border-radius: 1.25rem;
}

.frame__bar {
  display: flex;
  align-items: center;
  padding: 0.625rem;
  border-bottom: 2px solid var(--frame);
  background: var(--color-surface);
}

.frame__address {
  flex: 1;
  display: flex;
  align-items: center;
  height: 1.75rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--frame);
}

.frame__address .cursor {
  width: 0.45rem;
  height: 1.1rem;
}

.frame__empty {
  aspect-ratio: 16 / 10;
  background-image: repeating-linear-gradient(135deg, transparent 0 12px, var(--color-border) 12px 13px);
}

.card--project .card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0.75rem;
}

.card--project .card__body > * + * {
  margin-top: 0;
}

.card--project .card__title {
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.25rem 0 0;
  list-style: none;
}

/* In the frame's colour on the dark theme; the light theme keeps the text colour for contrast */
.card .tags li {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--frame, var(--color-link));
  border-radius: 999px;
  color: light-dark(var(--color-text), var(--frame, var(--color-link)));
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* A quote as a letter in front of an envelope, with a stamp and a Cockermouth postmark. The
   section is narrower, with the logo large and faint behind it. */

/* v5's 66rem, less its padding */
.quote-section {
  --container: 62rem;
}

/* The envelope's stamp is where the number would go, and the logo is large behind it instead */
.quote-section > .section-number-big {
  display: none;
}

.quote-section.band--pointer {
  padding-top: 6rem;
}

.quote-watermark {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.quote-watermark .logo {
  --color-logo: currentColor;
  --color-logo-zero: currentColor;
  --color-logo-cursor: currentColor;
  --color-logo-one: currentColor;
  position: absolute;
  top: -9rem;
  right: -10rem;
  width: 42rem;
  height: 42rem;
  max-width: none;
  color: var(--color-text);
  opacity: 0.1;
  rotate: -14deg;
}

.quote-section > .container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.quote--envelope {
  position: relative;
  padding-top: 6rem;
}

.envelope {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 3rem;
  left: 8%;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--envelope);
  box-shadow: 0 1.25rem 0 0 rgb(28 11 19 / 0.28);
  rotate: 1.5deg;
}

.envelope > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.envelope__bits {
  opacity: 0.14;
}

.envelope__flap path {
  fill: none;
  stroke: var(--pink);
  stroke-opacity: 0.25;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.envelope > .envelope__waves {
  inset: auto;
  top: 0.55rem;
  right: 10.6rem;
  width: 16rem;
  height: 3.625rem;
  overflow: visible;
}

.stamp {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 5.25rem;
  height: 6.5rem;
  padding: 0.5rem;
  border: 0.3rem dotted var(--envelope);
  background: var(--paper);
  rotate: 3deg;
}

.stamp__picture {
  flex: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: var(--teal);
}

.stamp .logo {
  --color-logo: var(--quote-ink);
  --color-logo-zero: var(--quote-ink);
  --color-logo-cursor: var(--quote-ink);
  --color-logo-one: var(--quote-ink);
  width: 2.75rem;
  height: 2.75rem;
}

.stamp__value {
  color: var(--quote-ink);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
}

.envelope > .postmark {
  inset: auto;
  top: 0.6rem;
  right: 4.9rem;
  width: 6rem;
  height: 6rem;
  color: var(--pink);
  rotate: -14deg;
}

.postmark circle {
  fill: none;
  stroke: currentColor;
}

.postmark text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-weight: 800;
}

.quote--envelope .quote__letter {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-right: clamp(2.5rem, 14%, 9rem);
  padding: clamp(2rem, 1rem + 3vw, 3.5rem);
  border-radius: 1rem;
  box-shadow: 0 1rem 0 0 rgb(28 11 19 / 0.25);
  color: var(--quote-ink);
  rotate: -1deg;
}

.quote--envelope blockquote::before {
  color: var(--pink);
}

.quote--envelope figcaption {
  margin-top: 0;
  border-top-color: var(--quote-ink);
  color: var(--quote-muted);
}

@media (max-width: 40rem) {
  .envelope {
    left: 4%;
  }

  .envelope > .envelope__waves {
    display: none;
  }

  .quote--envelope .quote__letter {
    margin-right: 1rem;
  }
}

/* Calls to action side by side: two in a row on wide screens */

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cta-row__panels {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.cta-row__panels > .cta {
  flex: 1 1 30rem;
}

/* Dividers drawn on the seam between two sections (includes/join.html). A section with a
   background starts at the seam; one without sits a gap below the section above, so its seam is
   halfway up the gap (--seam). Their editor chrome (pills, tabs, headers) keeps the editor's dark
   colours on every background, like the code in the cards. */

.sections > [data-number] {
  position: relative;
}

.sections > .band:is(.join--fold, .join--hunk, .join--ruler, .join--ants, .join--cursor, .join--tabs, .join--seam, .join--comment, .join--progress) {
  padding-top: 6.5rem;
}

.sections > :not(.band):is(.join--fold, .join--hunk, .join--ruler, .join--ants, .join--cursor, .join--tabs, .join--seam, .join--comment, .join--progress) {
  --seam: -4.5rem;
  margin-top: 9rem;
}

/* Running text, as in a written piece, has no padding of its own, so a section with a divider
   after it keeps its distance, clear of the divider's reach upwards (the ruler's guide, the diff's
   old side) */
.sections > :not(.band) + .band[class*="join--"] {
  margin-top: 7rem;
}

/* The container's edges, for dividers that line up with the text */
.join-ants,
.join-cursor,
.join-comment {
  position: absolute;
  left: max(var(--gutter), calc((100% - var(--container)) / 2));
  right: max(var(--gutter), calc((100% - var(--container)) / 2));
  top: var(--seam, 0);
}

/* A folded region of code: a line along the seam with a pill on it */
.join-fold {
  position: absolute;
  inset-inline: 0;
  top: var(--seam, 0);
  border-top: 1px solid var(--color-border);
}

.join-fold__pill {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--editor-border);
  border-radius: 999px;
  background: var(--ink);
  color: var(--editor-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.join-fold__pill svg {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--teal);
}

/* A diff's hunk: the old side tinted pink above the seam, the new side lime below, and the
   hunk's header across it */
.join-hunk {
  position: absolute;
  inset-inline: 0;
  top: calc(var(--seam, 0px) - 4rem);
  height: 8rem;
  font-family: var(--font-mono);
}

.join-hunk__side,
.join-hunk__head {
  position: absolute;
  inset-inline: 0;
  display: flex;
  align-items: center;
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
}

.join-hunk__side {
  height: 4rem;
  font-weight: 800;
}

.join-hunk__side--old {
  top: 0;
  background: rgb(255 143 179 / 0.1);
  color: light-dark(var(--pink-deep), var(--pink));
}

/* The new side is the section below's, so its sign takes that section's lime, ink on the bright
   styles */
.join-hunk__side--new {
  bottom: 0;
  background: rgb(198 242 95 / 0.1);
  color: var(--color-logo-one);
}

.join-hunk__head {
  top: 50%;
  translate: 0 -50%;
  gap: 0.75rem;
  height: 2rem;
  overflow: hidden;
  border-block: 1px solid var(--editor-border);
  background: var(--gutter-bg);
  color: var(--editor-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.join-hunk__head b {
  color: var(--teal);
  font-weight: 700;
}

.join-hunk__head i {
  font-family: inherit;
  font-style: normal;
}

.join-hunk__old {
  color: var(--pink);
}

.join-hunk__new {
  color: var(--lime);
}

/* A design tool's ruler along the seam, in pixels from the left, with a pink guide across it.
   The guide stands 244 pixels in, as its label says. */
.join-ruler {
  position: absolute;
  inset-inline: 0;
  top: var(--seam, 0);
}

.join-ruler__scale {
  position: absolute;
  inset-inline: 0;
  top: -0.75rem;
  display: flex;
  height: 1.5rem;
  overflow: hidden;
  border-block: 1px solid var(--editor-border);
  background-color: var(--gutter-bg);
  background-image:
    repeating-linear-gradient(90deg, var(--editor-muted) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, var(--paper) 0 1px, transparent 1px 40px);
  background-position: left bottom;
  background-size: 100% 6px, 100% 12px;
  background-repeat: repeat-x;
  counter-reset: ruler -40;
}

/* Each mark is 40 pixels apart, numbered by a counter, as a ruler is in pixels whatever the text
   size */
.join-ruler__scale i {
  flex: none;
  width: 40px;
  padding: 2px 0 0 3px;
  color: var(--editor-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  counter-increment: ruler 40;
}

.join-ruler__scale i::before {
  content: counter(ruler);
}

.join-ruler::before,
.join-ruler::after {
  position: absolute;
  left: 244px;
}

.join-ruler::before {
  content: "";
  top: -6rem;
  width: 1px;
  height: 10.5rem;
  background: var(--pink);
}

.join-ruler::after {
  content: "244";
  top: -2.4rem;
  translate: -50% 0;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

/* A selection's marching ants, with a handle at each end */
.join-ants__line {
  position: absolute;
  left: 0;
  top: -8px;
  width: 100%;
  height: 16px;
  max-width: none;
  overflow: visible;
}

.join-ants__line line {
  stroke: var(--color-text);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.join-ants i {
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-text);
  background: var(--color-band, var(--color-bg));
}

.join-ants i:first-of-type {
  left: -7px;
}

.join-ants i:last-of-type {
  right: -7px;
}

/* The logo's cursor on its side, stretched along the seam, as in the Code meets page drawing:
   drawn twice, ink under teal, so it shows on any colour, with the ink going all the way round,
   tips included. The ends keep their shape; the beam between them stretches. Strokes are in the
   ends' own units (the logo's), 52 pixels to 4,920 of them. */
.join-cursor {
  height: 52px;
  translate: 0 -50%;
}

.join-cursor__layer {
  --stroke: 760;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: var(--teal);
}

.join-cursor__layer--outline {
  --stroke: 1400;
  color: var(--ink);
}

.join-cursor__end {
  flex: none;
  width: 31px;
  height: 52px;
  overflow: visible;
}

.join-cursor__end path {
  stroke: currentColor;
  stroke-width: var(--stroke);
  stroke-linejoin: round;
}

.join-cursor__end--right {
  scale: -1 1;
}

.join-cursor__beam {
  flex: 1;
  height: calc(var(--stroke) * 52px / 4920);
  margin-inline: -1px;
  background: currentColor;
}

/* File tabs: the next section opens as a file, its tab the section's own colour */
.join-tabs {
  position: absolute;
  inset-inline: 0;
  bottom: calc(100% - var(--seam, 0px));
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 36px;
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
  border-bottom: 1px solid var(--color-border);
}

.join-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 10px 10px 0 0;
  background: var(--gutter-bg);
  color: var(--editor-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.join-tabs__tab--open {
  height: 37px;
  margin-bottom: -1px;
  border: 1px solid var(--color-border);
  border-bottom: 0;
  background: var(--color-band, var(--color-bg));
  color: var(--color-text);
}

.join-tabs__tab--open i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-logo-cursor);
}

@media (max-width: 40rem) {
  .join-tabs__tab:last-child {
    display: none;
  }
}

/* The words in binary as a thin barcode along the seam: teal for 1, dark for 0 */
.join-seam {
  position: absolute;
  inset-inline: 0;
  top: var(--seam, 0);
  display: flex;
  height: 12px;
  translate: 0 -50%;
}

.join-seam i {
  flex: 1;
}

.join-seam__0 {
  background: var(--editor-ghost);
}

.join-seam__1 {
  background: var(--teal);
}

/* A code comment as the section break, with the section's number in binary on numbered pages */
.join-comment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 1.75rem;
  translate: 0 -50%;
  padding-inline: 0.75rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.join-comment b {
  color: var(--pink);
  font-weight: 700;
}

.join-comment i {
  flex: 1;
  min-width: 1rem;
  border-top: 1px solid var(--editor-border);
}

.join-comment > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.join-comment__number {
  display: none;
}

.sections--numbered .join-comment__number {
  display: inline;
}

.sections--numbered .join-comment__number::after {
  content: "0b" counter(section, binary);
}

.sections--numbered .join-comment__heading {
  display: none;
}

/* Progress in bits: 1s fill in behind the cursor and 0s wait ahead of it, with the words
   and how far it's got under the bar */
.join-progress {
  position: absolute;
  left: max(var(--gutter), calc((100% - var(--container)) / 2));
  right: max(var(--gutter), calc((100% - var(--container)) / 2));
  top: var(--seam, 0);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  translate: 0 -0.95rem;
  font-family: var(--font-mono);
}

.join-progress__bar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 1.9rem;
  padding-inline: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

.join-progress__bar b {
  flex: 0 0 62%;
  overflow: hidden;
  color: var(--teal);
  text-align: right;
  direction: rtl;
}

.join-progress__bar i {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--editor-dim);
  font-style: normal;
}

.join-progress__caret {
  flex: none;
  width: 0.6rem;
  height: 1.3rem;
  margin-inline: 0.15rem;
  color: var(--paper);
}

.join-progress__label {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* The block picker's preview of a divider, between two sample sections */
.divider-preview > .band {
  padding-block: 3rem;
}

.divider-preview > .band + .band {
  padding-top: 6.5rem;
}

/* Text as a section. Plain text keeps to the page's rhythm, without a section's padding, except
   for room below it for a divider; text on a background is a section like the others. */
.sections > .text-band.band--plain {
  padding-bottom: 0;
}

.sections > .text-band.band--plain:not([class*="join--"]) {
  padding-top: 0;
}

.sections > .text-band.band--plain:has(+ [class*="join--"]) {
  padding-bottom: 6rem;
}

.sections > .band:not(.band--pointer) + .text-band.band--plain:not([class*="join--"]),
.sections > .text-band.band--plain + .band:not([class*="join--"]) {
  margin-top: var(--space-2xl);
}

/* Under a curly brace, room for its point */
.sections > .band--pointer + .text-band.band--plain:not([class*="join--"]) {
  padding-top: 6rem;
}

/* Drawings: the brand's pictures of the work and of an editor caught mid-change, each an SVG with
   its own colours, on a dark tile in both themes */
.drawing {
  overflow: hidden;
  border: 1px solid var(--editor-border);
  border-radius: var(--radius-m);
  background: var(--ink);
}

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

/* "You": a pink hand over a button, as if the visitor were about to click it */
.button--cursor {
  position: relative;
}

.button__cursor,
.hero-comment__cursor,
.hero-message__cursor,
.hero-mark__ash {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 0.1rem;
  pointer-events: none;
}

.button__cursor {
  left: calc(100% - 3rem);
  top: calc(100% - 1.1rem);
}

:is(.button__cursor, .hero-comment__cursor, .hero-message__cursor, .hero-mark__ash) svg {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  overflow: visible;
}

:is(.button__cursor, .hero-comment__cursor, .hero-message__cursor, .hero-mark__ash) b {
  align-self: flex-start;
  margin-top: 1.55rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.125rem 0.5rem 0.5rem;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
}

/* The "being edited" hero: a ruler along the top with a guide down the text's left edge, the
   highlight selected with Ash's cursor on it, the photo measured, and a comment thread with your
   cursor on it */
.page-hero--edited .page-hero__text {
  padding-top: 5rem;
}

.hero-ruler {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-ruler .join-ruler__scale {
  top: 0;
  border-top: 0;
}

.hero-ruler__guide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(var(--gutter), calc((100% - var(--container)) / 2));
  width: 1px;
  background: color-mix(in srgb, var(--pink) 70%, transparent);
}

.hero-ruler__tag {
  position: absolute;
  top: 1.9rem;
  left: max(var(--gutter), calc((100% - var(--container)) / 2));
  translate: -50% 0;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.page-hero--edited .page-hero__inner {
  position: relative;
}

/* Ash's cursor on the highlight's top right corner, as if selecting it */
.hero-mark__ash {
  left: calc(100% - 0.45rem);
  bottom: calc(100% - 1.75rem);
  font-size: 1rem;
}

.hero-mark__ash b {
  background: var(--teal);
}

/* The photo, selected and measured: a teal frame with a handle at each corner, its size above it
   and a resize arrow at the corner. The size is the photo's own, kept true by kyberfex.js. */
.measured {
  position: relative;
  display: block;
}

.measured__frame {
  position: absolute;
  inset: 0;
  outline: 2px solid var(--teal);
  pointer-events: none;
}

.measured__frame i {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--teal);
  background: var(--color-bg);
}

.measured__frame i:nth-child(1) {
  left: -6px;
  top: -6px;
}

.measured__frame i:nth-child(2) {
  right: -6px;
  top: -6px;
}

.measured__frame i:nth-child(3) {
  left: -6px;
  bottom: -6px;
}

.measured__frame i:nth-child(4) {
  right: -6px;
  bottom: -6px;
}

.measured__size {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.6rem);
  translate: -50% 0;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background: var(--teal);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.measured__resize {
  position: absolute;
  right: -1.6rem;
  bottom: 1.2rem;
  width: 1.75rem;
  height: 1.75rem;
}

/* A comment pinned to the photo: the pin, a short thread on paper, and your cursor on it */
.hero-comment {
  position: absolute;
  left: 0;
  bottom: 6rem;
  z-index: 1;
  width: min(15rem, 70%);
  pointer-events: none;
}

.hero-comment__pin {
  position: absolute;
  right: -0.75rem;
  top: -1.4rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50% 50% 50% 0.25rem;
  background: var(--pink);
  box-shadow: 0 0 0 3px var(--ink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
}

.hero-comment__thread {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.875rem;
  background: var(--paper);
  box-shadow: 0 0.6rem 0 0 rgb(0 0 0 / 0.35);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.35;
}

.hero-comment__thread p {
  display: flex;
  gap: 0.6rem;
  max-width: none;
}

.hero-comment__thread b {
  display: block;
  font-weight: 800;
}

.hero-comment__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--pink);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
}

.hero-comment__avatar--ash {
  background: var(--teal);
}

.hero-comment__cursor {
  right: -2.4rem;
  bottom: -1.6rem;
}

@media (max-width: 56rem) {
  .page-hero--edited .page-hero__photo {
    padding-top: 6rem;
  }
}

@media (max-width: 40rem) {
  .hero-comment {
    bottom: 3rem;
    width: min(13rem, 62%);
  }

  .hero-mark__ash {
    display: none;
  }
}


/* The other hero looks (includes/page_header.html). Without a highlight, the cursor waits after
   the heading; with one, the words are selected, as on the home page, without the formatting
   bar, which only the "being edited" look has. */
.hero-caret {
  display: inline-block;
  width: 0.34em;
  height: 0.86em;
  margin-left: 0.14em;
  vertical-align: -0.06em;
  color: var(--color-logo-cursor);
}

.hero-caret svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.page-hero:is(.page-hero--code, .page-hero--portrait, .page-hero--fixing, .page-hero--message, .page-hero--locked) .hero-mark {
  margin-top: 0.15em;
}

/* In the editor: a gutter of line numbers in binary, the heading's tags, and the line it's on
   lit, as an editor shows the line the cursor is on */
.page-hero--code .page-hero__text {
  position: relative;
  z-index: 0;
  padding-left: 3.75rem;
}

.code-gutter {
  position: absolute;
  left: 0;
  top: 2.25rem;
  bottom: 4.5rem;
  display: flex;
  flex-direction: column;
  width: 2.75rem;
  padding-right: 0.65rem;
  overflow: hidden;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 2;
  text-align: right;
}

.code-gutter i {
  font-family: inherit;
  font-style: normal;
}

.code-tag {
  display: block;
  color: var(--color-logo-zero);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
}

.page-hero--code .code-tag + h1,
.page-hero--code h1 + .code-tag {
  margin-top: 0.35rem;
}

.page-hero--code h1 {
  position: relative;
}

.page-hero--code h1::before {
  content: "";
  position: absolute;
  inset: -0.12em -100vw -0.12em -3.75rem;
  z-index: -1;
  background: color-mix(in srgb, var(--color-logo-cursor) 10%, transparent);
}

/* Being fixed: a computer's dialog box by the photo, two problems ticked off and one in hand, a
   progress bar in bits, and the busy cursor */
.hero-dialog,
.hero-message {
  position: absolute;
  left: 0;
  bottom: 5.5rem;
  z-index: 1;
  border-radius: 0.875rem;
  box-shadow: 0 0.6rem 0 0 rgb(0 0 0 / 0.35);
  pointer-events: none;
}

.hero-dialog {
  width: min(16.5rem, 74%);
  border: 1px solid var(--editor-border);
  background: #121821;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.hero-dialog__bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--editor-border);
  color: var(--editor-muted);
  font-size: 0.75rem;
}

.hero-dialog__bar i {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--pink);
}

.hero-dialog__bar i:nth-child(2) {
  background: var(--lime);
}

.hero-dialog__bar i:nth-child(3) {
  background: var(--teal);
}

.hero-dialog__bar span {
  margin-left: auto;
}

.hero-dialog__list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0.75rem 0.9rem 0.25rem;
  list-style: none;
}

.hero-dialog__list li {
  display: flex;
  gap: 0.5rem;
  max-width: none;
}

.hero-dialog__list b {
  width: 1rem;
  color: var(--teal);
}

.hero-dialog__list .is-done {
  color: var(--editor-muted);
  text-decoration: line-through;
  text-decoration-color: var(--pink);
}

.hero-dialog__list .is-done b {
  color: var(--lime);
}

.hero-dialog__progress {
  display: flex;
  align-items: center;
  margin: 0.65rem 0.9rem 0;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-dialog__progress b {
  color: var(--teal);
}

.hero-dialog__progress i {
  color: var(--editor-dim);
  font-style: normal;
}

.hero-dialog__progress svg {
  flex: none;
  width: 0.5rem;
  height: 1.1rem;
  margin-inline: 0.1rem;
  color: var(--paper);
}

.hero-dialog__label {
  margin: 0.35rem 0.9rem 0.85rem;
  color: var(--editor-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-dialog__cursor {
  position: absolute;
  right: -1.4rem;
  bottom: -1.3rem;
  display: flex;
  align-items: flex-end;
}

.hero-dialog__cursor svg {
  width: 2.25rem;
  height: 2.25rem;
  overflow: visible;
}

.hero-dialog__busy {
  width: 1rem;
  height: 1rem;
  margin-left: -0.6rem;
  border: 3px solid var(--teal);
  border-right-color: transparent;
  border-radius: 50%;
}

/* A message: a text box on paper with the cursor in it, Send with your cursor on it, and an
   envelope with a stamp */
.hero-message {
  display: grid;
  gap: 0.5rem;
  width: min(17rem, 76%);
  padding: 0.9rem 1rem 1rem;
  background: var(--paper);
  color: var(--ink);
}

.hero-message__label {
  font-size: 0.8125rem;
  font-weight: 800;
}

.hero-message__field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem;
  overflow: hidden;
  border: 2px solid var(--teal);
  border-radius: 0.6rem;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgb(61 224 197 / 0.3);
  color: #4b5363;
  font-size: 0.875rem;
  white-space: nowrap;
}

.hero-message__caret {
  flex: none;
  width: 0.45rem;
  height: 1.1rem;
  color: var(--teal-deep);
}

.hero-message__caret svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-message__send {
  position: relative;
  justify-self: end;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 4px 0 0 var(--teal-deep);
  font-size: 0.875rem;
  font-weight: 700;
}

.hero-message__cursor {
  left: calc(100% - 1.75rem);
  top: calc(100% - 1rem);
}

.hero-envelope {
  position: absolute;
  right: 0;
  top: 3.25rem;
  z-index: 1;
  width: clamp(5rem, 9vw, 7.5rem);
  rotate: 8deg;
  filter: drop-shadow(0.35rem 0.35rem 0 var(--color-bg));
  pointer-events: none;
}

@media (max-width: 40rem) {
  .hero-dialog,
  .hero-message {
    bottom: 3rem;
  }
}

/* Locked: the heading and introduction in a read-only frame, a dashed selection hatched in pink,
   with a handle at each corner, a tag, a padlock and the not-allowed cursor */
.page-hero--locked .page-hero__text {
  position: relative;
  z-index: 0;
  padding-top: 4.25rem;
  padding-inline: 1.5rem;
}

.locked-frame {
  position: absolute;
  inset: 2rem 0 4rem;
  z-index: -1;
  border: 2px dashed var(--color-logo-zero);
  border-radius: 0.5rem;
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgb(255 143 179 / 0.08) 10px 11px);
  pointer-events: none;
}

.locked-frame i {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--color-logo-zero);
  background: var(--color-bg);
}

.locked-frame i:nth-child(1) {
  left: -6px;
  top: -6px;
}

.locked-frame i:nth-child(2) {
  right: -6px;
  top: -6px;
}

.locked-frame i:nth-child(3) {
  left: -6px;
  bottom: -6px;
}

.locked-frame i:nth-child(4) {
  right: -6px;
  bottom: -6px;
}

.locked-frame__tag {
  position: absolute;
  left: 0.75rem;
  bottom: calc(100% + 2px);
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem 0.25rem 0 0;
  background: var(--color-logo-zero);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.locked-frame__lock {
  position: absolute;
  right: 1.25rem;
  top: -0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.4;
}

.locked-frame__lock svg {
  width: 0.8rem;
  height: 0.8rem;
}

.locked-frame__cursor {
  position: absolute;
  right: 2rem;
  bottom: -1.1rem;
  width: 2.25rem;
  height: 2.25rem;
}

/* Form fields: the cursor in them is the logo's teal, as the brand board's text fields */
input,
textarea {
  caret-color: var(--color-logo-cursor);
}

/* Motion: slow and subtle, and only for visitors whose system doesn't ask for less. The ribbons
   drift, the ring of bits turns, the logo's 0 and 1 bob and now and then swap places, and
   buttons, cards and projects lift a little on hover. */

@media (prefers-reduced-motion: no-preference) {
  .join-ants__line line {
    animation: ants 1.6s linear infinite;
  }

  .hero-dialog__busy {
    animation: busy 1.2s linear infinite;
  }

  .ribbon__piece {
    animation: drift var(--drift) linear infinite;
  }

  .ribbon--bits .ribbon__piece {
    animation-direction: reverse;
    animation-duration: calc(var(--drift) * 0.8);
  }

  .ribbons--still .ribbon__piece {
    animation: none;
  }

  .orbit__bits {
    animation: turn 90s linear infinite;
  }

  .orbit__digit {
    animation: bob 6s ease-in-out infinite;
  }

  .orbit__digit--right {
    animation-delay: -3s;
  }

  .digit--first {
    animation: bit-first 10s ease-in-out infinite;
  }

  .digit--later {
    animation: bit-later 10s ease-in-out infinite;
  }

  .button {
    transition: transform 0.2s ease;
  }

  .button:hover {
    transform: translateY(-3px);
  }

  :is(.card--editor, .card--code, .card--switches) {
    transition: transform 0.25s ease;
  }

  :is(.card--editor, .card--code, .card--switches):hover {
    transform: translateY(-6px);
  }

  .card__selection {
    transition: opacity 0.2s ease;
  }

  .card-grid--projects .card--project {
    transition:
      rotate 0.3s ease,
      translate 0.3s ease;
  }
}

/* A pixel of depth makes the drift a 3D move, so Firefox moves the cursors' SVG smoothly too */
@keyframes drift {
  from {
    translate: 0 0 1px;
  }

  to {
    translate: -100% 0 1px;
  }
}

@keyframes turn {
  to {
    rotate: 1turn;
  }
}

/* A pixel of depth makes the bob a 3D move, which Firefox doesn't snap to whole pixels */
@keyframes bob {
  0%,
  100% {
    transform: translate3d(0, 0, 1px);
  }

  50% {
    transform: translate3d(0, -12px, 1px);
  }
}

@keyframes bit-first {
  0%,
  44% {
    transform: scaleY(1);
  }

  48%,
  94% {
    transform: scaleY(0);
  }

  98%,
  100% {
    transform: scaleY(1);
  }
}

@keyframes bit-later {
  0%,
  44% {
    transform: scaleY(0);
  }

  48%,
  94% {
    transform: scaleY(1);
  }

  98%,
  100% {
    transform: scaleY(0);
  }
}

@keyframes ants {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes busy {
  to {
    rotate: 1turn;
  }
}
