:root {
  --ink: #14161c;
  --muted: #5f6368;
  --paper: #f8f9fa;
  --grid: #dfe1e5;
  --blue: #4272fc;
  --blue-soft: #e8eeff;
  --white: #ffffff;
  --measure: 44rem;
  --face-font: Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--blue); }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--grid);
  background: var(--white);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}
/* The logo is one cell with a face in it, fill handle included */
.brand-cell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 26px;
  border: 2px solid var(--blue);
  background: var(--white);
  font: 600 14px/1 var(--face-font);
}
.brand-cell::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  background: var(--blue);
  border: 1px solid var(--white);
}
.site-header nav { display: flex; gap: 20px; font-size: 15px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

/* Hero, on a spreadsheet grid */
.hero {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 40px;
  border-bottom: 1px solid var(--grid);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  gap: 32px;
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero .lead {
  margin: 0;
  max-width: 34rem;
  font-size: 20px;
  background: var(--paper);
}
.hero .status {
  display: inline-block;
  margin-top: 24px;
  padding: 4px 12px;
  border: 2px solid var(--blue);
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
}
/* Celly herself: a button, although she says she is not one */
.celly-stage { position: relative; }
.celly {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.celly:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.celly svg { display: block; width: 100%; height: auto; overflow: visible; }
.celly .face {
  font-family: var(--face-font);
  font-size: 34px;
  font-weight: 700;
  fill: var(--ink);
}
.celly.dancing svg {
  transform-origin: 50% 90%;
  animation: celly-dance 0.5s ease-in-out 3;
}
@keyframes celly-dance {
  0%, 100% { transform: rotate(0) translateY(0); }
  25% { transform: rotate(-6deg) translateY(-10px); }
  50% { transform: rotate(5deg) translateY(0); }
  75% { transform: rotate(-3deg) translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .celly.dancing svg { animation: none; }
}

/* Speech bubble, in the empty space above Celly's cell */
.bubble {
  position: absolute;
  top: -8px;
  left: 18%;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--grid);
  background: var(--white);
  box-shadow: 0 2px 6px rgba(20, 22, 28, 0.15);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.bubble.shown { opacity: 1; }
.bubble::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 100%;
  border: 7px solid transparent;
  border-top-color: var(--white);
  filter: drop-shadow(0 1px 0 var(--grid));
}

/* Content sections */
main section { padding: 48px 0; }
main section + section { border-top: 1px solid var(--grid); }
main h2 { margin: 0 0 16px; font-size: 28px; line-height: 1.2; }
main h3 { margin: 32px 0 8px; font-size: 20px; }
main p, main ul { max-width: var(--measure); }
main ul { padding-left: 1.25em; }
main li + li { margin-top: 6px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: none !important;
  padding: 0 !important;
  list-style: none;
  counter-reset: step;
}
.steps li {
  margin: 0 !important;
  padding: 20px;
  border: 1px solid var(--grid);
  background: var(--white);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}
.steps strong { display: block; }

.note {
  max-width: var(--measure);
  padding: 16px 20px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
}
.note p { margin: 0; }

/* Legal pages */
.legal { padding: 48px 0 64px; }
.legal h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 44px); line-height: 1.15; }
.legal .updated { margin: 0 0 32px; color: var(--muted); }
.legal h2 { margin-top: 40px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--grid);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
}
.site-footer .wrap { padding-top: 32px; padding-bottom: 32px; }
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--muted); }

@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .celly-stage { width: 100%; max-width: 260px; justify-self: center; }
  .steps { grid-template-columns: 1fr; }
}
