/* The PatroneOS website. Colors come from branding/README.md: Patrone
   Blue #288bfa, Highlight #4da0fc, Mid #2372dd, Deep #1851a8, and the
   near-black #030303 background. Mid carries white text (4.6:1); Patrone
   Blue itself is too light for small white text. */

/* PatroneOS's own fonts, served from this site: tools/make_fonts.py makes
   them from billsecond/patroneos-fonts. SIL Open Font License 1.1:
   static/patroneos-fonts-OFL.txt. PatroneOS Sans sets the whole site, at
   the four weights it uses; Mono sets code; the other three appear only on
   /fonts. A browser downloads a file only when a page uses it. */
@font-face {
  font-family: "PatroneOS Sans";
  src: url("patroneos-sans-light.woff2?v=0.23.0") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Sans";
  src: url("patroneos-sans-regular.woff2?v=0.23.0") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Sans";
  src: url("patroneos-sans-semibold.woff2?v=0.23.0") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Sans";
  src: url("patroneos-sans-bold.woff2?v=0.23.0") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Mono";
  src: url("patroneos-mono-regular.woff2?v=0.23.0") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Mono";
  src: url("patroneos-mono-bold.woff2?v=0.23.0") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Document";
  src: url("patroneos-document-regular.woff2?v=0.23.0") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Document";
  src: url("patroneos-document-bold.woff2?v=0.23.0") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Serif";
  src: url("patroneos-serif-regular.woff2?v=0.23.0") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Serif";
  src: url("patroneos-serif-bold.woff2?v=0.23.0") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Classic";
  src: url("patroneos-classic-regular.woff2?v=0.23.0") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PatroneOS Classic";
  src: url("patroneos-classic-bold.woff2?v=0.23.0") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --font: "PatroneOS Sans", system-ui, sans-serif;
  --mono: "PatroneOS Mono", ui-monospace, monospace;

  --bg: #ffffff;
  --bg-alt: #f2f5f9;
  --surface: #ffffff;
  --text: #11161d;
  --muted: #4d5866;
  --rule: #d7dee8;
  --field: #7b8797;
  --link: #1d63c4;
  --button: #2372dd;
  --button-hover: #1851a8;
  --focus: #2372dd;
  --error: #b42318;
  --error-bg: #fef3f2;
  --shadow: 0 1px 2px rgb(17 22 29 / 0.06), 0 16px 40px rgb(17 22 29 / 0.12);

  --hero-text: #0b1830;
  --hero-muted: #2f405a;
  --hero-scrim: linear-gradient(90deg, rgb(255 255 255 / 0.88) 0%, rgb(255 255 255 / 0.6) 48%, rgb(255 255 255 / 0) 100%);
  --hero-scrim-small: rgb(255 255 255 / 0.72);
  --hero-image: url("/static/hero-light.webp?v=0.23.0");
  --hero-image-small: url("/static/hero-light-960.webp?v=0.23.0");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07090d;
    --bg-alt: #0c1117;
    --surface: #10161e;
    --text: #e8edf4;
    --muted: #a3aebd;
    --rule: #1f2833;
    --field: #5c6a7c;
    --link: #4da0fc;
    --button: #2372dd;
    --button-hover: #288bfa;
    --focus: #4da0fc;
    --error: #fda29b;
    --error-bg: #2a1311;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 40px rgb(0 0 0 / 0.5);

    --hero-text: #ffffff;
    --hero-muted: #c5d0de;
    --hero-scrim: linear-gradient(90deg, rgb(3 3 3 / 0.82) 0%, rgb(3 3 3 / 0.5) 52%, rgb(3 3 3 / 0) 100%);
    --hero-scrim-small: rgb(3 3 3 / 0.62);
    --hero-image: url("/static/hero-dark.webp?v=0.23.0");
    --hero-image-small: url("/static/hero-dark-960.webp?v=0.23.0");
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 1.5rem + 3.8vw, 4.1rem);
}

h2 {
  font-size: clamp(1.8rem, 1.35rem + 1.9vw, 2.7rem);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0;
}

p,
ul {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--button);
  color: #fff;
}

.skip:focus {
  top: 0.5rem;
}

/* The privacy notice (notice.js); hidden without JavaScript, where the
   footer says the same */

.site-notice {
  border-bottom: 1px solid var(--rule);
  background: var(--bg-alt);
  font-size: 0.95rem;
}

.site-notice[hidden] {
  display: none;
}

.site-notice-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
}

.site-notice p {
  flex: 1 1 20rem;
  margin: 0;
}

.site-notice-close {
  padding: 0.4rem 1.2rem;
}

.plain-notice {
  color: var(--text);
}

/* Navigation: always dark, like the desktop's own login screen. */

.site-header {
  background: #030303;
  color: #e8edf4;
  border-bottom: 1px solid #18202c;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.5rem;
  min-height: 3.75rem;
}

.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  padding-block: 0.8rem;
}

.brand img {
  width: auto;
  height: 30px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  color: #e8edf4;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgb(255 255 255 / 0.08);
}

.site-nav a[aria-current="page"] {
  border-radius: 0;
  box-shadow: inset 0 -2px 0 #4da0fc;
}

.site-nav .nav-cta a {
  margin-left: 0.5rem;
  background: var(--button);
  color: #fff;
  font-weight: 600;
}

.site-nav .nav-cta a:hover {
  background: #288bfa;
}

.site-nav .nav-cta a[aria-current="page"] {
  border-radius: 6px;
  box-shadow: none;
}

@media (max-width: 40rem) {
  .site-header .wrap {
    padding-bottom: 0.6rem;
  }

  .brand {
    padding-block: 0.7rem 0.5rem;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    justify-content: space-between;
  }

  .site-nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.92rem;
    white-space: nowrap;
  }

  /* "Based on Ubuntu" becomes "Ubuntu" */
  .site-nav .wide-only {
    display: none;
  }

  .site-nav .nav-cta a {
    margin-left: 0;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--button);
  color: #fff;
}

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

.btn-secondary {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.btn-secondary:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Hero: Neon Horizon without its logo, light or dark with the system. */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--bg) var(--hero-image) center / cover no-repeat;
  color: var(--hero-text);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-scrim);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: min(76vh, 42rem);
  padding-block: 4.5rem;
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero .lead {
  color: var(--hero-muted);
}

.hero-mark {
  justify-self: center;
  width: min(100%, 19rem);
  filter: drop-shadow(0 0 48px rgb(40 139 250 / 0.45));
}

.page-hero .wrap {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.page-hero .lead {
  max-width: 46rem;
}

@media (max-width: 60rem) {
  .hero {
    background-image: var(--hero-image-small);
  }
}

@media (max-width: 48rem) {
  .hero::before {
    background: var(--hero-scrim-small);
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    min-height: 0;
    padding-block: 2.5rem 3rem;
  }

  .hero-mark {
    order: -1;
    justify-self: start;
    width: 6rem;
  }
}

.eyebrow {
  margin-bottom: 0.9rem;
  color: var(--link);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.32rem);
  line-height: 1.55;
}

/* Strips: full-width bands, as on most distribution sites. */

.strip {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

.strip--alt {
  background: var(--bg-alt);
}

.strip--dark {
  --text: #e8edf4;
  --muted: #a8b3c2;
  --rule: #222c38;
  --link: #4da0fc;
  --surface: #0f151d;
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgb(35 114 221 / 0.22), transparent 70%),
    #05080d;
  color: var(--text);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.row + .row {
  margin-top: 3.5rem;
}

.row > :last-child > :last-child {
  margin-bottom: 0;
}

@media (max-width: 48rem) {
  .row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.section-head {
  max-width: 48rem;
  margin-bottom: 2.5rem;
}

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 2rem 2.5rem;
  margin-top: 3rem;
}

.point {
  padding-top: 1rem;
  border-top: 3px solid var(--button);
}

.point p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.5rem 2.5rem;
  margin-block: 2rem;
}

.ticks {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 1.6rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--link);
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.ticks--no li::before {
  top: 0.75em;
  width: 0.8rem;
  height: 0;
  border-width: 2px 0 0;
  transform: none;
}

.fineprint {
  color: var(--muted);
  font-size: 0.9rem;
}

.more {
  margin: 2.5rem 0 0;
  font-weight: 600;
}

.caption {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}

.card .icon {
  width: 56px;
  height: 56px;
  margin-bottom: 0.5rem;
}

.card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

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

.card ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.badge {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--button) 15%, transparent);
  color: var(--link);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 2rem 3.5rem;
}

.feature + .feature {
  margin-top: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.feature--flip > :first-child {
  order: 2;
}

@media (max-width: 56rem) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature--flip > :first-child {
    order: 0;
  }
}

/* The pinned 3D section on the home page. Without motion (reduced motion,
   or no way to drive it) it's the flat picture below. With motion, the
   section is a little over three screens tall, its stage sticks, and the
   scroll position drives the animations further down: through CSS
   scroll-driven animations where the browser has them, or else through
   /static/pin.js, which sets the same animations' current time. */

.pin {
  background: var(--bg-alt);
}

.pin-sticky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 0.4rem + 2vh, 1.75rem);
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
  overflow: clip;
}

.pin-copy .eyebrow {
  margin-bottom: 0.6rem;
}

.pin-copy h2 {
  margin-bottom: 0;
}

.pin-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 2rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.pin-step strong {
  display: block;
  font-size: 1.05rem;
}

.pin-step span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.pin-progress {
  display: none;
  height: 3px;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 3px;
  background: var(--rule);
}

.pin-progress span {
  display: block;
  height: 100%;
  background: var(--button);
  transform-origin: left;
}

.pin-scene {
  width: min(100% - 2rem, 60rem, (100svh - 21rem) * 1.7778);
  margin-inline: auto;
  perspective: 170vmin;
  perspective-origin: 50% 15%;
}

.pin-caption {
  margin: 0;
}

.pin-screen {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

/* The desktop fills the screen; each layer's picture is sized below, and
   its image fills it */
.pin-base,
.pin-screen img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

/* Where shoot.sh puts each window on its 1920x1080 screen, and where the
   Start menu opens */
.pin-layer {
  display: block;
  position: absolute;
  border-radius: 0.5cqw;
  box-shadow: 0 1cqw 3cqw rgb(0 0 0 / 0.35);
}

.pin-layer--files {
  left: 3.6458%;
  top: 6.4815%;
  width: 50%;
  height: 59.2593%;
}

.pin-layer--term {
  left: 55.7292%;
  top: 13.8889%;
  width: 41.6667%;
  height: 55.5556%;
}

.pin-layer--start {
  left: 1.5625%;
  top: 48.4259%;
  width: 28.2292%;
  height: 47.963%;
}

@media (max-width: 48rem) {
  .pin-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .pin-step strong {
    font-size: 1rem;
  }

  .pin-step span {
    font-size: 0.88rem;
  }
}

@keyframes pin-screen {
  0% {
    transform: translateY(4%) rotateX(62deg) rotateZ(0deg) scale(0.8);
  }
  30% {
    transform: translateY(2%) rotateX(52deg) rotateZ(-26deg) scale(0.78);
  }
  65% {
    transform: translateY(1%) rotateX(40deg) rotateZ(-14deg) scale(0.84);
  }
  100% {
    transform: translateY(0) rotateX(0deg) rotateZ(0deg) scale(1);
  }
}

@keyframes pin-files {
  0% {
    transform: translateZ(0);
  }
  30%,
  65% {
    transform: translateZ(9cqw);
  }
  100% {
    transform: translateZ(0);
  }
}

@keyframes pin-term {
  0% {
    transform: translateZ(0) translateX(0);
  }
  30%,
  65% {
    transform: translateZ(17cqw) translateX(4cqw);
  }
  100% {
    transform: translateZ(0) translateX(0);
  }
}

@keyframes pin-start {
  0%,
  38% {
    opacity: 0;
    transform: translateZ(12cqw) translateY(8cqw);
  }
  60% {
    opacity: 1;
    transform: translateZ(25cqw) translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateZ(0) translateY(0);
  }
}

@keyframes pin-step-1 {
  0%,
  30% {
    opacity: 1;
  }
  36%,
  100% {
    opacity: 0.4;
  }
}

@keyframes pin-step-2 {
  0%,
  30% {
    opacity: 0.4;
  }
  36%,
  62% {
    opacity: 1;
  }
  68%,
  100% {
    opacity: 0.4;
  }
}

@keyframes pin-step-3 {
  0%,
  62% {
    opacity: 0.4;
  }
  68%,
  100% {
    opacity: 1;
  }
}

@keyframes pin-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pin-screen {
    animation: pin-screen 1s linear both;
  }

  .pin-layer--files {
    animation: pin-files 1s linear both;
  }

  .pin-layer--term {
    animation: pin-term 1s linear both;
  }

  .pin-layer--start {
    animation: pin-start 1s linear both;
  }

  .pin-step--1 {
    animation: pin-step-1 1s linear both;
  }

  .pin-step--2 {
    animation: pin-step-2 1s linear both;
  }

  .pin-step--3 {
    animation: pin-step-3 1s linear both;
  }

  .pin-progress span {
    animation: pin-progress 1s linear both;
  }

  @supports (animation-timeline: view()) {
    .pin {
      height: 320vh;
      view-timeline: --pin block;
    }

    .pin-sticky {
      position: sticky;
      top: 0;
      height: 100vh;
      height: 100svh;
      padding-block: 1.5rem;
    }

    .pin-progress {
      display: block;
    }

    .pin-screen,
    .pin-layer,
    .pin-step,
    .pin-progress span {
      animation-duration: auto;
      animation-timeline: --pin;
      animation-range: contain 0% contain 100%;
      will-change: transform, opacity;
    }
  }

  /* The same, driven by pin.js. */
  .pin--js {
    height: 320vh;
  }

  .pin--js .pin-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    padding-block: 1.5rem;
  }

  .pin--js .pin-progress {
    display: block;
  }

  .pin--js .pin-screen,
  .pin--js .pin-layer {
    will-change: transform, opacity;
  }
}

/* Screenshots (tools/make_shots.py) */

.shot {
  margin: 0;
}

.shot img,
.theme img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.shot figcaption {
  margin-top: 0.75rem;
  font-weight: 600;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* The same shape for each, so the captions line up */
.gallery img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: left top;
}

@media (max-width: 56rem) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}

.themes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: 1.25rem 1rem;
}

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

.theme {
  margin: 0;
}

.theme img {
  box-shadow: none;
}

.theme figcaption {
  margin-top: 0.75rem;
}

.theme figcaption strong {
  display: block;
  font-size: 1.05rem;
}

.theme figcaption span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* The forms: download and privacy requests */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: 2.5rem 4rem;
}

@media (max-width: 56rem) {
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form {
  display: grid;
  /* minmax(0, ...): a long address can't stretch the form past a phone's
     screen */
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.hint {
  margin: -0.1rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--field);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--button);
  outline: 3px solid color-mix(in srgb, var(--button) 35%, transparent);
  outline-offset: 0;
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  margin: 0.4rem 0 0;
  color: var(--error);
  font-size: 0.93rem;
  font-weight: 600;
}

.form-error {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--error);
  border-radius: 8px;
  background: var(--error-bg);
}

.form .btn {
  justify-self: start;
}

/* Hidden from people (and from screen readers by aria-hidden); a field
   only bots fill in. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.aside {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg-alt);
}

.aside h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.aside p:last-child,
.aside ul:last-child {
  margin-bottom: 0;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.6rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.cta .lead {
  margin-bottom: 0;
}

.btn-large {
  padding: 0.95rem 1.8rem;
  font-size: 1.1rem;
}

/* Privacy and download pages */

.updated {
  margin: 1rem 0 0;
  color: var(--hero-muted);
  font-size: 0.92rem;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.subnav a {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.subnav a:hover {
  background: color-mix(in srgb, var(--button) 10%, transparent);
}

.subnav a[aria-current="page"] {
  background: color-mix(in srgb, var(--button) 15%, transparent);
  color: var(--link);
}

.prose h3 {
  margin-top: 1.75rem;
}

.services h2 {
  margin-top: 3rem;
}

.services h2:first-child {
  margin-top: 0;
}

.svc {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--button);
  border-radius: 8px;
  background: var(--surface);
}

.svc h3 {
  margin: 0 0 0.5rem;
}

.svc p {
  margin: 0 0 0.6rem;
}

.svc p:last-child {
  margin-bottom: 0;
}

.svc-who {
  color: var(--link);
  font-size: 0.92rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.svc-ubuntu {
  color: var(--muted);
  font-size: 0.92rem;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.6rem 1.5rem;
  margin: 0 0 1rem;
}

.facts dt {
  font-weight: 600;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .facts dd {
    margin-bottom: 0.6rem;
  }
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

/* One click selects the whole hash; download.js adds a Copy button. In
   PatroneOS Mono, like all code, so 0 is dotted and every character lines up */
.hash {
  word-break: break-all;
  user-select: all;
}

.copy {
  margin-left: 0.4rem;
  padding: 0.15rem 0.7rem;
  font-size: 0.85rem;
  vertical-align: baseline;
}

/* .btn sets display, which would show a hidden button */
.copy[hidden] {
  display: none;
}

.choices {
  margin: 0;
  padding: 0;
  border: 0;
}

.choices legend {
  margin-bottom: 0.5rem;
  padding: 0;
  font-weight: 600;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.35rem 0;
  font-weight: 400;
}

.choice input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--button);
}

.cta-actions {
  margin-top: 0;
}

/* The download form and counts */

.download-form {
  max-width: 46rem;
}

.licence-box,
.optional-box {
  min-width: 0;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
}

.licence-box h3 {
  margin-bottom: 0.75rem;
}

.licence-version {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.badge--warn {
  background: color-mix(in srgb, #e5a50a 25%, transparent);
  color: var(--text);
}

/* What the privacy request form does with what's sent, above its button */
.collection-notice {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 0.93rem;
}

.collection-notice h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.collection-notice ul {
  margin: 0;
  padding-left: 1.2rem;
}

.collection-notice li + li {
  margin-top: 0.3rem;
}

.licence-note {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.source-line {
  margin-top: 1rem;
  overflow-wrap: anywhere;
}

.licence {
  max-height: 18rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  overflow-y: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg);
  font-size: 0.95rem;
}

.licence h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.licence h4 {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
}

.licence p,
.licence ul {
  margin: 0 0 0.75rem;
}

/* Choices are plain text; only the licence box is bold */
.field .choice {
  font-weight: 400;
}

.field .choice--strong {
  align-items: flex-start;
  font-weight: 600;
}

.choice--strong input {
  margin-top: 0.2rem;
  flex: none;
}

.optional-box legend {
  padding: 0 0.4rem;
  font-weight: 600;
}

.optional-box .field + .field,
.optional-box .choices {
  margin-top: 1rem;
}

.other-label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-weight: 400;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.stat-tile {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
}

.stat-number {
  color: var(--link);
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
}

.bars {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.bars li {
  display: grid;
  grid-template-columns: minmax(6rem, 14rem) minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.75rem;
}

.bars meter {
  width: 100%;
  height: 0.9rem;
}

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 40rem) {
  .bars li {
    grid-template-columns: minmax(0, 1fr) 3rem;
  }

  .bars meter {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Footer */

.site-footer {
  padding-block: 3rem 2rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.95rem;
}

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

@media (max-width: 40rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-brand img {
  width: 32px;
  height: 32px;
}

.site-footer h2 {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.site-footer a:hover {
  color: var(--text);
}

.legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

.legal p {
  max-width: 60rem;
}

.legal p:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .site-nav a {
    transition: background-color 0.15s ease;
  }
}

/* /source: the published images' source folders, and each folder's listing */
.source-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.source-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
}

.path-title {
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.2rem);
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}

.listing {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.listing th,
.listing td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.listing th {
  font-weight: 600;
  white-space: nowrap;
}

.listing .name {
  overflow-wrap: anywhere;
}

.listing .num {
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
}

.listing .when {
  white-space: nowrap;
  color: var(--muted);
}

@media (max-width: 40rem) {
  .listing .when {
    display: none;
  }
}

/* The fonts page: a specimen of each family, its samples set in that
   family (the heading too), its description in the site's own font */

.specimens {
  display: grid;
  gap: 1.25rem;
}

.specimen {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}

.specimen h2 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 700;
}

.specimen-about {
  max-width: 46rem;
  margin: 0;
  color: var(--muted);
}

.sample-big {
  margin: 1.25rem 0 0.75rem;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sample-text,
.sample-weights {
  margin: 0.5rem 0 0;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.sample-weights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.w300 { font-weight: 300; }
.w400 { font-weight: 400; }
.w600 { font-weight: 600; }
.w700 { font-weight: 700; }

.sample-box {
  margin: 0.5rem 0 0;
  overflow-x: auto;
  font-size: 1.25rem;
  line-height: normal;
}

.specimen--sans .sample { font-family: var(--font); }
.specimen--mono .sample { font-family: var(--mono); }
.specimen--document .sample { font-family: "PatroneOS Document", sans-serif; }
.specimen--serif .sample { font-family: "PatroneOS Serif", serif; }
.specimen--classic .sample { font-family: "PatroneOS Classic", sans-serif; }
