/* piccolospace.com — one stylesheet for every page.
   Light "plaster" for reading and marketing pages; dark "slate" for the business side, closing bands, footer and device tools. */

/* ------------------------------------------------------------------ */
/* Font and tokens                                                     */
/* ------------------------------------------------------------------ */

/* Outfit, self-hosted: the latin subset of its variable font, weights 100-900 (SIL Open Font License) */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --plaster: #d9dcd3;
  --plaster-light: #e6e8e1;
  --plaster-deep: #c8ccc1;
  --ink: #1f2428;
  --ink-soft: #4a5157;
  --slate: #1c2830;
  --slate-deep: #152027;
  --on-slate: #e3e7e4;
  --on-slate-soft: #a9b4b6;
  --amber: #e0a030;
  --gutter: 16px;
  --page: min(1180px, calc(100% - 2 * var(--gutter)));
  --h2-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.75rem);
  /* Outfit at weight 600: the cap line sits 0.2em below the top of a line box at line-height 1.1 */
  --h2-cap-offset: calc(var(--h2-size) * 0.2);
}

@media (min-width: 700px) {
  :root {
    --gutter: 32px;
  }
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Pages that scroll and pages that don't keep the same width */
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* The footer stays at the bottom of short pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--plaster);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  /* At very large text sizes a long word breaks rather than running off a phone screen */
  overflow-wrap: break-word;
}

/* So does an email address in running text */
a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.6rem, 1.2rem + 5vw, 5.25rem);
  line-height: 1.02;
}

h2 {
  font-size: var(--h2-size);
  line-height: 1.1;
}

/* A section heading styled at list-item size, for lists that are a page's top-level sections */
.h3 {
  font-size: 1.375rem;
  line-height: 1.2;
}

p {
  max-width: 34rem;
  text-wrap: pretty;
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a {
  color: inherit;
}

/* Focus: ink on the light wall (amber is too faint there), amber on slate */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.on-slate :focus-visible,
.page-dark :focus-visible,
.site-header-bar.is-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--amber);
}

.on-slate a:not(.button),
.page-dark main a:not(.button) {
  text-underline-offset: 3px;
}

.wrap {
  width: var(--page);
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

/* Amber, like every focus mark: it reads on both the light wall and slate */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

/* Device and support tools sit on slate, with the header in the page flow */
body.page-dark {
  background: var(--slate);
  color: var(--on-slate);
  color-scheme: dark;
}

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

/* Sits over the first band of the page; in the flow on the device tools */
.site-header-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.site-header-bar.is-static {
  position: relative;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  padding-block: 15px;
}

.logo {
  display: block;
  line-height: 0;
}

/* The wordmark's baseline sits on the navigation's baseline (measured with Outfit: within 0.1px) */
.logo img {
  position: relative;
  top: -3px;
  height: 30px;
  width: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  padding: 0;
  list-style: none;
}

/* Each link is a 44px-tall target */
.site-nav a {
  display: inline-block;
  padding-block: 9px;
  font-size: 1rem;
  font-weight: 520;
  color: var(--ink-soft);
  text-decoration: none;
}

/* Phones: the menu is one row under the logo; GitHub is in the footer */
@media (max-width: 599px) {
  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    justify-content: space-between;
    gap: 0 8px;
  }

  .site-nav .nav-github {
    display: none;
  }
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header-bar.is-dark .site-nav a {
  color: var(--on-slate-soft);
}

.site-header-bar.is-dark .site-nav a:hover,
.site-header-bar.is-dark .site-nav a[aria-current="page"] {
  color: var(--on-slate);
}

/* ------------------------------------------------------------------ */
/* Buttons and links                                                   */
/* ------------------------------------------------------------------ */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

/* Real <button> elements: drop the browser's default face */
button.button {
  font-family: inherit;
  cursor: pointer;
}

/* A button waiting on something (the waitlist form until its endpoint answers) */
.button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.button-primary {
  background: var(--ink);
  color: var(--plaster-light);
}

.button-primary:hover {
  background: #3d464d;
}

.button-secondary {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--ink);
  color: var(--plaster-light);
}

.on-slate .button-primary {
  background: var(--on-slate);
  color: var(--slate);
}

.on-slate .button-primary:hover {
  background: #c5ccc8;
}

.on-slate .button-secondary {
  border-color: var(--on-slate-soft);
  color: var(--on-slate);
}

.on-slate .button-secondary:hover {
  background: var(--on-slate);
  color: var(--slate);
}

.button-block {
  width: 100%;
}

/* Phones: buttons fill the row, so a wrapped pair never ends up two different widths */
@media (max-width: 519px) {
  .actions .button {
    flex: 1 1 auto;
  }
}

.text-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.text-link:hover,
.prose a:hover,
.thesis-after a:hover,
.contact-email a:hover,
.page-dark main a:not(.button):hover {
  text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------ */
/* Bands and shared layouts                                            */
/* ------------------------------------------------------------------ */

.band {
  padding-block: 80px;
}

.band-light {
  background: var(--plaster-light);
}

@media (min-width: 900px) {
  .band {
    padding-block: 112px;
  }
}

.page-intro + .band {
  padding-top: 8px;
}

.band-tool {
  padding-bottom: 96px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.split .intro-text p {
  margin-top: 20px;
}

.split .intro-text p + p {
  margin-top: 16px;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
  }

  /* Beside a section heading, a drawing or block starts on the heading's cap line, not the top of its line box */
  .split > svg,
  .split > .stack {
    margin-top: var(--h2-cap-offset);
  }

  /* The engine board's outline starts 3px inside its drawing */
  .split > .engine-art {
    margin-top: calc(var(--h2-cap-offset) - 3px);
  }

  /* Text beside a heading: its cap line sits slightly higher than the heading's (measured 1.5px at a 44px heading) */
  .split > .points {
    margin-top: calc(var(--h2-size) * 0.034);
  }
}

/* Two-up list with a rule above each item */
.build-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.build-items li {
  padding-top: 20px;
  border-top: 1.5px solid var(--ink);
}

.build-items h3 {
  font-size: 1.375rem;
  line-height: 1.2;
}

.build-items h2 a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.build-items h2 a:hover {
  text-decoration-thickness: 2px;
}

.build-items p {
  margin-top: 10px;
  color: var(--ink-soft);
}

@media (min-width: 800px) {
  .build-items {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  /* Each item's heading, text and link sit on the same lines as its neighbour's */
  .build-items li {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
}

/* Three-up list with a rule above each item; actions sit on one line across columns, stacked buttons share one width */
.principles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.principles li {
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  border-top: 1.5px solid var(--ink);
}

.principles h3,
.principles h4 {
  font-size: 1.375rem;
  line-height: 1.2;
}

.principles p {
  margin-top: 10px;
  color: var(--ink-soft);
}

.principles .actions {
  flex-direction: column;
  align-items: stretch;
  max-width: 17rem;
  margin-top: auto;
  padding-top: 20px;
}

@media (min-width: 800px) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  /* Each item's heading, text and actions sit on the same lines as its neighbours' */
  .principles li {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
}

/* Rack "How it works": what we need from you, what you get */
.exchange {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.exchange-col {
  padding-top: 20px;
  border-top: 1.5px solid var(--ink);
}

.exchange h3 {
  font-size: 1.375rem;
  line-height: 1.2;
}

.exchange-list {
  margin-top: 14px;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
}

.exchange-list li {
  position: relative;
  padding-left: 22px;
}

.exchange-list li + li {
  margin-top: 10px;
}

/* A text dash rather than a drawn bar, so every marker renders the same and sits on the text's own line */
.exchange-list li::before {
  content: "\2013";
  position: absolute;
  left: 0;
}

@media (min-width: 800px) {
  .exchange {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

@media (max-width: 519px) {
  .principles .actions {
    max-width: none;
  }

  .principles .actions .button {
    flex: none;
  }
}

/* Closing band */
.closing {
  background: var(--slate);
  color: var(--on-slate);
}

.closing p {
  margin-top: 16px;
  color: var(--on-slate-soft);
}

.closing .actions {
  margin-top: 32px;
}

/* The Frame waitlist form, in the Frame page's closing band; its fields share the device tools' style */
.waitlist-box {
  max-width: 34rem;
  margin-top: 32px;
}

.waitlist-form .actions {
  margin-top: 24px;
}

.field .optional {
  font-weight: 400;
  color: var(--on-slate-soft);
}

.field textarea {
  resize: vertical;
}

/* A field people never see; anything typed into it came from a bot */
.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 0.9375rem;
}

.form-status:empty {
  display: none;
}

/* Once saved, the form gives way to this confirmation, eased into the same place */
.form-done {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid #34424c;
  border-radius: 10px;
  background: #24323b;
}

.form-done[hidden] {
  display: none;
}

/* The check lights up like the Frame's power light */
.form-done-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-done h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--on-slate);
}

.form-done p {
  margin-top: 6px;
}

.form-done strong {
  font-weight: 600;
  color: var(--on-slate);
  overflow-wrap: anywhere;
}

.form-done.is-new {
  animation: done-in 450ms ease-out both;
}

.form-done.is-new .form-done-mark {
  animation: power-on 900ms 200ms ease-out both;
}

@keyframes done-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-done.is-new,
  .form-done.is-new .form-done-mark {
    animation: none;
  }
}

/* Focus moves here once the signup is saved; the message itself isn't a control */
.form-done:focus {
  outline: none;
}

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

.site-footer {
  padding-block: 48px 40px;
  background: var(--slate-deep);
  color: var(--on-slate-soft);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.footer-logo {
  display: block;
  justify-self: start;
  line-height: 0;
}

/* The wordmark's baseline sits on the footer links' baseline */
.footer-logo img {
  position: relative;
  top: -0.8px;
  height: 22px;
  width: auto;
}

.footer-meta {
  display: grid;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--on-slate);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.copyright {
  color: var(--on-slate-soft);
}

/* Two rows: logo and site links, then utility links and copyright, on one left edge */
@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: auto 1fr;
    column-gap: 48px;
    row-gap: 24px;
    align-items: center;
  }

  .footer-grid > .footer-logo {
    grid-column: 1;
    grid-row: 1;
  }

  .footer-grid > nav {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-meta {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(227, 231, 228, 0.12);
  }
}

/* ------------------------------------------------------------------ */
/* Home: the promise and two doors                                     */
/* ------------------------------------------------------------------ */

.intro {
  padding: calc(var(--header-h, 108px) + 26px) 0 56px;
  text-align: center;
  background: radial-gradient(90% 120% at 50% 0%, var(--plaster-light) 0%, var(--plaster) 70%);
}

.intro .lede {
  margin: 20px auto 0;
  max-width: 30rem;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (min-width: 700px) {
  .intro {
    padding: calc(var(--header-h, 74px) + 62px) 0 72px;
  }
}

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

.door {
  --art-h: clamp(220px, 58vw, 300px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px var(--gutter) 72px;
  text-align: center;
}

/* The whole door is the link: the button's link stretches over it, so the title and drawing in view are clickable too */
.door .button::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Its top starts in the promise's colour, so the light door flows on from it with no seam */
.door-frame {
  background:
    linear-gradient(var(--plaster), transparent 160px),
    radial-gradient(120% 90% at 50% 20%, var(--plaster-light) 0%, var(--plaster) 60%, var(--plaster-deep) 100%);
}

/* Phones: the doors stack and the Frame door carries on from the promise, so it needs no gap of its own */
@media (max-width: 699px) {
  .door-frame {
    padding-top: 16px;
  }
}

.door-rack {
  background: radial-gradient(120% 90% at 50% 20%, #24343e 0%, var(--slate) 65%);
  color: var(--on-slate);
}

.door-art {
  display: block;
  width: auto;
  height: var(--art-h);
  margin: 28px 0 32px;
}

/* The Frame drawing carries room for its wall shadow; scale and offset it so both objects read the same size and line up */
.door-frame .door-art {
  height: calc(var(--art-h) * 1.17);
  margin-top: calc(28px - var(--art-h) * 0.022);
  margin-bottom: calc(32px - var(--art-h) * 0.143);
}

.door .audience {
  margin-top: 6px;
  font-size: 1.125rem;
  font-weight: 560;
  color: var(--ink-soft);
}

.door-rack .audience {
  color: var(--on-slate-soft);
}

.door .door-text {
  margin: 0 auto 28px;
  max-width: 24rem;
}

.door .actions {
  justify-content: center;
  margin-top: auto;
}

@media (min-width: 700px) {
  .doors {
    grid-template-columns: 1fr 1fr;
  }

  .door {
    --art-h: clamp(200px, 26vw, 300px);
    padding: 56px clamp(24px, 4vw, 80px) 72px;
  }
}

@media (min-width: 900px) {
  .door {
    padding: 72px clamp(32px, 5vw, 80px) 96px;
  }
}

/* Power lights switch on once as the page loads */
.led,
.led-halo {
  opacity: 0;
  animation: power-on 1100ms 700ms ease-out forwards;
}

@keyframes power-on {
  0% {
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  55% {
    opacity: 0.45;
  }

  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .led,
  .led-halo {
    animation: none;
    opacity: 1;
  }
}

/* One engine */
.engine-art {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .engine-art {
    margin-right: 0;
  }
}

.legend {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  color: var(--ink-soft);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swatch {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 3px;
}

.swatch-root {
  background: var(--ink);
}

.swatch-branch {
  background: #66707a;
}

.swatch-leaf {
  background: #c8cdd1;
  box-shadow: inset 0 0 0 1.5px #6d757b;
}

.swatch-corner {
  border: 1.5px dashed #6f766b;
}

/* ------------------------------------------------------------------ */
/* Product pages: the hero wall                                        */
/* ------------------------------------------------------------------ */

.hero {
  padding-top: calc(var(--header-h, 108px) + 26px);
  background: radial-gradient(110% 90% at 80% 10%, var(--plaster-light) 0%, var(--plaster) 55%, var(--plaster-deep) 100%);
}

.hero.hero-dark {
  background: radial-gradient(110% 90% at 80% 10%, #26363f 0%, var(--slate) 60%, var(--slate-deep) 100%);
  color: var(--on-slate);
}

@media (min-width: 700px) {
  .hero {
    padding-top: calc(var(--header-h, 74px) + 46px);
  }
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-block: 0 72px;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.4rem + 3.8vw, 4.25rem);
}

.hero-copy .lede {
  margin-top: 24px;
  max-width: 30rem;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero-dark .hero-copy .lede {
  color: var(--on-slate-soft);
}

/* The Rack's one number, set as a figure under the headline */
/* The label sits on the figure's baseline; where it has to wrap, its last line does */
.hero-stat {
  display: flex;
  align-items: last baseline;
  gap: 14px;
  margin-top: 28px;
}

.hero-stat-figure {
  font-size: clamp(2.75rem, 1.9rem + 2.8vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--amber);
}

.hero-stat-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--on-slate-soft);
}

.hero-copy .actions {
  margin-top: 32px;
}

@media (min-width: 960px) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding-block: 48px 120px;
  }
}

/* The object and its card: card below with left edges aligned, or (wide screens) beside with bottoms aligned */
.wall {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wall .frame-svg {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
}

.placard {
  align-self: flex-start;
  max-width: 240px;
  padding: 12px 16px 14px;
  background: #f2f3ee;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(31, 36, 40, 0.05), 0 8px 16px -10px rgba(52, 60, 50, 0.45);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.placard p + p {
  margin-top: 4px;
}

.placard .placard-title {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink);
}

.placard .placard-medium {
  font-style: italic;
}

/* Room for the label beside the object: one-column heroes from 700px, and two-column heroes from 1200px */
@media (min-width: 700px) and (max-width: 959px), (min-width: 1200px) {
  .wall {
    flex-direction: row;
    align-items: flex-end;
    gap: 28px;
  }

  .wall-rack {
    justify-content: center;
  }

  .wall .frame-svg {
    flex: 1 1 auto;
    min-width: 0;
  }

  .placard {
    flex: 0 0 172px;
    align-self: flex-end;
  }
}

/* Wide screens give the Frame's column more room, so the Frame doesn't shrink when its label moves beside it */
@media (min-width: 1200px) {
  .hero-frame .hero-body {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

/* The Rack and its nameplate, which is the drawing's sixth bay */
.rack-mount {
  position: relative;
  align-self: center;
  max-width: 100%;
}

.rack-svg {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(290px, 83vw, 446px);
}

/* Brushed aluminium with a screw in each corner */
.plate {
  background:
    radial-gradient(circle at 8px 8px, #7f878d 2px, transparent 2.6px),
    radial-gradient(circle at calc(100% - 8px) 8px, #7f878d 2px, transparent 2.6px),
    radial-gradient(circle at 8px calc(100% - 8px), #7f878d 2px, transparent 2.6px),
    radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), #7f878d 2px, transparent 2.6px),
    linear-gradient(135deg, #e6e9eb 0%, #c3c9cd 100%);
}

/* The slot's position in the drawing: x 26-274, y 277-318 of the 282 x 330 box */
.rack-mount .plate {
  position: absolute;
  left: 6.028%;
  right: 6.028%;
  top: 82.424%;
  bottom: 5.152%;
  /* Fill the slot: the card's align-self would otherwise shrink an absolutely positioned box to its text */
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  margin: 0;
  padding: 0 22px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  line-height: 1.25;
}

.rack-mount .plate p + p {
  margin-top: 0;
}

.rack-mount .plate .placard-title {
  font-size: 0.875rem;
}

.rack-mount .plate p:not(.placard-title) {
  font-size: 0.75rem;
}

/* Wide enough for one line: title left, line right */
@media (min-width: 480px) {
  .rack-mount .plate {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 22px;
  }

  .rack-mount .plate .placard-title {
    font-size: 0.9375rem;
  }

  .rack-mount .plate p:not(.placard-title) {
    font-size: 0.8125rem;
  }
}

/* In a two-column hero the Rack sits centred in its column */
@media (min-width: 960px) {
  .wall-rack .rack-mount {
    align-self: center;
  }
}

/* Side by side, the Rack sizes from the column width like the Frame does (its height cap of 446px is 381px wide) */
@media (min-width: 1200px) {
  .rack-mount {
    flex: 0 1 381px;
    min-width: 0;
    align-self: auto;
  }

  .rack-svg {
    width: 100%;
    max-width: none;
    height: auto;
  }
}

/* ------------------------------------------------------------------ */
/* Frame page                                                          */
/* ------------------------------------------------------------------ */

.points {
  display: grid;
  gap: 24px;
  margin: 0;
}

.points dt {
  font-weight: 640;
}

.points dd {
  margin: 2px 0 0;
  color: var(--ink-soft);
}

/* How it works: a real sequence, so numbered */
.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  color: #7d858b;
}

.steps h3 {
  margin-top: 16px;
  font-size: 1.375rem;
  line-height: 1.2;
}

.steps p {
  margin-top: 10px;
  color: var(--ink-soft);
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  /* Number, heading and text sit on the same lines across the three steps */
  .steps li {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
}

/* Inside the Frame */
.inside-art {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-inline: auto;
}

.key {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
  counter-reset: key;
}

.key li {
  display: flex;
  align-items: center;
  gap: 14px;
  counter-increment: key;
}

.key li::before {
  content: counter(key);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--plaster-light);
  font-size: 0.875rem;
  font-weight: 700;
}

/* Founder story */
.thesis blockquote {
  margin: 32px 0 0;
}

.thesis blockquote p {
  max-width: 40rem;
  font-size: clamp(1.375rem, 1rem + 1.3vw, 1.875rem);
  font-style: italic;
  font-weight: 380;
  line-height: 1.45;
}

.thesis .thesis-after {
  margin-top: 24px;
  color: var(--ink-soft);
}

.thesis .thesis-after a {
  font-weight: 600;
  color: var(--ink);
  text-underline-offset: 4px;
}

/* ------------------------------------------------------------------ */
/* Rack page                                                           */
/* ------------------------------------------------------------------ */

/* Rewritten for your model: the layers, top of the stack to the wire */
.stack {
  display: grid;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  list-style: none;
}

.stack li {
  padding: 16px 22px;
  background: var(--slate);
  color: var(--on-slate);
  font-weight: 500;
}

.stack li + li {
  border-top: 1px solid rgba(227, 231, 228, 0.1);
}

.stack li:nth-child(2) {
  background: #24323b;
}

.stack li:nth-child(3) {
  background: #2c3b45;
}

.stack li:nth-child(4) {
  background: #35454f;
}

.first-text {
  margin-top: 20px;
  color: var(--ink-soft);
}

/* Two or more text links on one line, wrapping on phones */
.text-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 32px;
}

/* ------------------------------------------------------------------ */
/* Content pages: intro, long-form reading, blog, contact              */
/* ------------------------------------------------------------------ */

.page-intro {
  padding: calc(var(--header-h, 108px) + 26px) 0 64px;
  background: radial-gradient(90% 120% at 50% 0%, var(--plaster-light) 0%, var(--plaster) 70%);
}

.page-intro h1 {
  font-size: clamp(2.5rem, 1.4rem + 3.6vw, 4.25rem);
  line-height: 1.04;
}

.page-intro .lede {
  margin-top: 20px;
  max-width: 36rem;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (min-width: 700px) {
  .page-intro {
    padding: calc(var(--header-h, 74px) + 62px) 0 80px;
  }
}

.page-intro .actions {
  margin-top: 32px;
}

/* The thesis and the legal pages */
.prose {
  max-width: 36rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 64px;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.125rem);
  line-height: 1.15;
}

.prose h3 {
  margin-top: 36px;
  font-size: 1.3rem;
  line-height: 1.25;
}

.prose p,
.prose ul {
  margin-top: 18px;
  max-width: none;
}

.prose h2 + p,
.prose h3 + p,
.prose h2 + ul {
  margin-top: 14px;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 6px;
}

.prose a {
  font-weight: 560;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 650;
}

/* A bold label on its own line (the thesis's principles) gets a little room before its text */
.prose p > strong:first-child:has(+ br) {
  display: inline-block;
  margin-bottom: 4px;
}

.prose-legal h2 {
  margin-top: 40px;
  font-size: 1.375rem;
  line-height: 1.25;
}

.prose .meta {
  color: var(--ink-soft);
}

.prose .actions {
  margin-top: 28px;
}

/* Blog list */
.post-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list li {
  padding-block: 32px;
  border-top: 1.5px solid var(--ink);
}

.post-list h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.875rem);
  line-height: 1.2;
}

.post-list h2 a {
  text-decoration: none;
}

.post-list h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.post-source {
  padding: 1px 10px;
  border: 1px solid rgba(31, 36, 40, 0.35);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 560;
}

.post-list p {
  margin-top: 12px;
  color: var(--ink-soft);
}

.post-list .post-note {
  font-size: 0.875rem;
}

.contact-email {
  margin-top: 48px;
  color: var(--ink-soft);
}

/* Piccolo OS help sits under the two product cards, not beside them */
.contact-email + .contact-device {
  margin-top: 12px;
}

@media (min-width: 800px) {
  .principles-pair {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------------------------ */
/* Device tools: support, abuse report, app catalog                   */
/* ------------------------------------------------------------------ */

.tool-intro {
  padding: 32px 0 40px;
}

.tool-intro h1 {
  font-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.5rem);
  line-height: 1.06;
}

.tool-intro .lede {
  margin-top: 16px;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--on-slate-soft);
}

.panel {
  max-width: 34rem;
  padding: 28px;
  border: 1px solid #34424c;
  border-radius: 10px;
  background: #24323b;
}

.panel + .panel {
  margin-top: 20px;
}

.panel h2 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.panel h2 + p {
  margin-top: 10px;
  color: var(--on-slate-soft);
}

/* Focus moves here when the report is ready; the panel itself isn't a control */
#confirmation-message:focus {
  outline: none;
}

.panel .label {
  font-size: 0.9375rem;
  font-weight: 560;
  color: var(--on-slate-soft);
}

.panel .actions {
  margin-top: 24px;
}

.field + .field {
  margin-top: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 560;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #7a8890;
  border-radius: 6px;
  background: var(--slate-deep);
  color: var(--on-slate);
  font: inherit;
  font-size: 1rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7f8b8f;
}

.copy-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.copy-row input,
.copy-row textarea {
  flex: 1 1 auto;
  min-width: 0;
}

/* Phones: the Copy button goes under its field, so the field keeps the width */
@media (max-width: 519px) {
  .copy-row {
    flex-direction: column;
  }

  .copy-row input,
  .copy-row textarea {
    width: 100%;
  }
}

/* Abuse report: the copy fields are the fallback, under the main action */
.copy-lead {
  margin-top: 28px;
  color: var(--on-slate-soft);
}

.copy-lead + .field {
  margin-top: 12px;
}

/* Support page */
.serial {
  margin-top: 6px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--on-slate);
}

.serial.is-missing {
  color: var(--on-slate-soft);
}

.serial-hint {
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--on-slate-soft);
}

/* For the registration and model lines, once they have real values */
.fine-print {
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--on-slate-soft);
}
