/*
 * The site in the "Pastel Desk" look: ink on paper for all text, pastels as fills, one-pixel ink
 * outlines (two CSS pixels), hard offset shadows, dithered bands. Colours come from tokens.css
 * only. Text is set in rem so that the reader's font size setting applies.
 */

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

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

/* A column whose main part grows, so that the footer stays at the bottom of a short page. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

main:focus {
  box-shadow: none;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  background: var(--lilac-light);
}

/* The page's width and side gutters: 16px on a phone, centred on a wide screen. */
.site-bar,
main,
.site-footer {
  padding-inline: max(16px, calc((100% - 72rem) / 2));
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 16px;
  z-index: 10;
  padding: 6px 12px;
  border: var(--outline);
  background: var(--butter);
  box-shadow: var(--shadow-small);
}

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

/* Buttons: card fill, ink outline, a small hard shadow that the press takes away. */
.button,
.site-nav a,
.language-nav a {
  display: inline-block;
  padding: 4px 12px;
  border: var(--outline);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-small);
}

.button:hover,
.site-nav a:hover,
.language-nav a:hover {
  background: var(--lilac-light);
}

.button:active,
.site-nav a:active,
.language-nav a:active {
  transform: translate(var(--pixel), var(--pixel));
  box-shadow: none;
}

.button:focus-visible,
.site-nav a:focus-visible,
.language-nav a:focus-visible {
  box-shadow: var(--focus-ring), var(--shadow-small);
}

.site-nav a[aria-current="page"],
.language-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

/* The bitmap face (src/pixel-svg.ts) */
.pixel-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pixel-words {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-start;
  max-width: 100%;
  vertical-align: middle;
}

.pixel-words-2 {
  column-gap: 8px;
}

.pixel-words-3 {
  column-gap: 12px;
}

.pixel-word {
  display: block;
  flex: none;
}

.pixel-ink {
  fill: currentColor;
}

.pixel-shadow-dot {
  fill: var(--pink);
}

.pixel-fallback {
  font-weight: 700;
}

/* A drawing made at two sizes (pixelTextResponsive): the small one on a phone. */
.pixel-large {
  display: none;
}

@media (min-width: 640px) {
  .pixel-small {
    display: none;
  }

  .pixel-large {
    display: inline-flex;
  }
}

.heading {
  margin: 0 0 16px;
  font-size: 1.5rem;
  line-height: 1.2;
}

/* The bar: the wordmark on its sky tab over a lilac dither, the switches on the right. */
.site-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 14px;
  border-bottom: var(--outline);
  background: var(--dither-lilac);
}

.site-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 2px 10px;
  border: var(--outline);
  background: var(--sky);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.site-tab:hover {
  background: var(--sky);
}

.site-tab:focus-visible {
  box-shadow: var(--focus-ring), var(--shadow);
}

.site-icon {
  flex: none;
  image-rendering: pixelated;
}

.site-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.language-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a,
.language-nav a {
  padding: 2px 10px;
  font-size: 0.9375rem;
}

/* On a phone the switch shows language codes; the link's name stays the language's own name. */
.language-code {
  display: none;
}

@media (max-width: 639px) {
  .language-code {
    display: inline;
  }

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

  .language-nav a {
    padding-inline: 8px;
  }
}

/* Main column */
main {
  display: block;
  flex: 1;
  padding-block: 32px 48px;
}

.section {
  margin-block: 56px;
}

/* Hero: the wordmark, the tagline, what it is, and that it is not out yet. */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero-title {
  margin: 0 0 12px;
  line-height: 1;
}

.tagline {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  max-width: 38rem;
  margin: 0 0 24px;
  font-size: 1.1875rem;
}

.status {
  max-width: 38rem;
  margin: 0;
  padding: 10px 14px;
  border: var(--outline);
  background: var(--butter);
  box-shadow: var(--shadow-small);
}

.hero-art {
  justify-self: start;
  padding: 20px;
  border: var(--outline);
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-art img {
  display: block;
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr auto;
  }

  .hero-art {
    justify-self: end;
    padding: 28px;
  }

  .hero-art img {
    width: 256px;
    height: 256px;
  }
}

/* Screenshots of the manager: they carry their own window, outline and shadow on paper. */
.shot {
  margin: 40px 0;
}

.shot img {
  display: block;
  width: 100%;
}

.shot figcaption {
  margin-top: 12px;
  color: var(--muted-ink);
  font-size: 0.9375rem;
}

/* Features: each one a card with a group colour, its name beside the colour. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  border: var(--outline);
  background: var(--card);
  box-shadow: var(--shadow);
}

.feature-title {
  margin: 0;
  padding: 8px 14px;
  border-bottom: var(--outline);
  background: var(--group-grey);
  font-size: 1.0625rem;
  line-height: 1.35;
}

.feature p {
  margin: 0;
  padding: 12px 14px 16px;
}

.feature-title[data-colour="sky"] {
  background: var(--sky);
}

.feature-title[data-colour="mint"] {
  background: var(--mint);
}

.feature-title[data-colour="pink"] {
  background: var(--pink);
}

.feature-title[data-colour="butter"] {
  background: var(--butter);
}

.feature-title[data-colour="purple"] {
  background: var(--group-purple);
}

.feature-title[data-colour="cyan"] {
  background: var(--group-cyan);
}

.feature-title[data-colour="orange"] {
  background: var(--group-orange);
}

.feature-title[data-colour="red"] {
  background: var(--group-red);
}

/* Panels: a pastel fill under ink text, with the window's outline and shadow. */
.local,
.summary {
  padding: 20px 20px 8px;
  border: var(--outline);
  background: var(--mint);
  box-shadow: var(--shadow);
}

.checklist {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 24px;
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 10px;
  height: 10px;
  background: var(--ink);
}

/* The privacy policy */
.policy {
  max-width: 46rem;
}

.policy-head {
  margin-bottom: 32px;
}

.updated {
  margin: 0;
  color: var(--muted-ink);
}

.note {
  margin: 16px 0 0;
  padding: 8px 12px;
  border: var(--outline);
  background: var(--sky);
}

.summary {
  margin-bottom: 32px;
}

.contents {
  margin-bottom: 40px;
  padding: 16px 20px;
  border: var(--outline);
  background: var(--card);
  box-shadow: var(--shadow-small);
}

.contents ol {
  margin: 0;
  padding-left: 1.5em;
}

.policy-section {
  margin-top: 48px;
}

.policy-section ul {
  padding-left: 1.25em;
}

.policy-section li {
  margin-bottom: 8px;
}

.controller {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: var(--outline);
  background: var(--card);
}

.controller dt {
  font-weight: 600;
}

.controller dd {
  margin: 0;
}

.statement {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: var(--outline);
  background: var(--card);
  box-shadow: var(--shadow-small);
}

.statement p {
  margin: 0;
}

/* A detail the operator has not confirmed: impossible to miss. */
.todo {
  padding: 0 4px;
  border: var(--pixel) solid var(--danger);
  background: var(--danger-fill);
  color: var(--danger);
  font-size: 0.875em;
  font-weight: 700;
  white-space: nowrap;
}

.not-found {
  max-width: 40rem;
}

/* Footer: a dithered band, then the name and the policy link. */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px 28px;
  border-top: var(--outline);
  background:
    linear-gradient(var(--paper), var(--paper)) 0 8px / 100% 100% no-repeat,
    var(--dither-rule);
}

.site-footer p {
  margin: 0;
}

.footer-name {
  font-weight: 700;
}

.footer-tagline {
  color: var(--muted-ink);
}

@media (max-width: 479px) {
  .controller {
    grid-template-columns: minmax(0, 1fr);
  }

  .controller dd {
    margin-bottom: 8px;
  }
}
