@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("fonts/mplus-rounded-1c-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --cobalt: #1f46c8;
  --cobalt-deep: #18379f;
  --on-cobalt-soft: #d5defa;
  --sheet: #ffffff;
  --tint: #e8edfb;
  --ink: #101b4a;
  --ink-soft: #4a557f;
  --child: #f7b500;
  --read: #157a43;
  --act: #c42b1c;
  --outline: #4a557f;
  --corner: 14px;
  --unit: 72px;
  --gutter: clamp(16px, 4vw, 56px);
  --display: "M PLUS Rounded 1c", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--on-cobalt-soft) var(--cobalt-deep);
}

body {
  background: var(--cobalt);
  color: #fff;
  font:
    400 1.125rem / 1.55 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  caret-color: var(--cobalt);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--child);
  color: var(--ink);
}

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

.sheet :focus-visible {
  outline-color: var(--cobalt);
}

h1,
h2,
.logo,
.child,
.allergens,
.person b,
.chip,
.timeline b {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1,
h2 {
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.08;
}

p {
  max-width: 68ch;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  background: #fff;
  color: var(--ink);
  padding: 12px 16px;
  border-radius: var(--corner);
}

.skip:focus {
  top: 12px;
  z-index: 2;
}

.small {
  font-size: 0.9375rem;
  color: var(--on-cobalt-soft);
}

/* Top bar */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px var(--gutter);
}

.logo {
  background: #fff;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  padding: 12px 18px;
  border-radius: var(--corner);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 32px);
}

.top nav a {
  color: #fff;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  padding: 10px 0;
}

.top nav a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.top nav .nav-action {
  white-space: nowrap;
  border: 2px solid #fff;
  border-radius: var(--corner);
  padding: 9px 16px;
}

.top nav .nav-action:hover {
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr);
  align-items: end;
  gap: 24px clamp(24px, 4vw, 64px);
  padding: clamp(16px, 3vw, 40px) var(--gutter) clamp(32px, 4vw, 56px);
}

h1 {
  font-size: clamp(2.5rem, 6.2vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-action p {
  margin-bottom: 14px;
}

.field {
  display: flex;
  gap: 6px;
  background: #fff;
  border-radius: var(--corner);
  padding: 6px;
  max-width: 480px;
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
  border-radius: 10px;
}

.field input::placeholder {
  color: var(--ink-soft);
  opacity: 1;
}

.field input:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 0;
}

.field button {
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.field button:hover {
  background: var(--cobalt-deep);
}

.field + .small {
  margin-top: 10px;
}

/* The backing sheet */

.sheet {
  background: var(--sheet);
  color: var(--ink);
  margin: 0 var(--gutter);
  border-radius: 28px;
  padding: 0 clamp(18px, 4vw, 56px);
}

.sheet > section {
  padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 80px);
  border-top: 2px dashed var(--tint);
}

.sheet > section:first-child {
  border-top: 0;
  padding-top: clamp(28px, 4vw, 48px);
}

.sheet h2 + *,
.schools h2 + * {
  margin-top: 20px;
}

.sheet p {
  color: var(--ink);
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px clamp(24px, 4vw, 56px);
}

/* Demo: the card label and the people labels */

.demo {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 32px clamp(28px, 4vw, 56px);
  align-items: stretch;
}

.card-label {
  background: var(--child);
  border-radius: 28px;
  padding: clamp(22px, 3vw, 34px);
  transform: rotate(-2deg);
  box-shadow: 0 10px 24px -14px rgb(16 27 74 / 0.45);
  align-self: start;
}

.slot-name {
  font-weight: 700;
  font-size: 1rem;
}

.child {
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 1;
}

.allergens {
  font-size: clamp(1.625rem, 3vw, 2.5rem);
  line-height: 1.05;
  margin-top: 10px;
}

.readers h2 {
  font-size: clamp(1.625rem, 3vw, 2.5rem);
}

#read-n {
  font-variant-numeric: tabular-nums;
}

.people {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}

.person {
  min-height: var(--unit);
  border-radius: var(--corner);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px dashed var(--outline);
  transform: rotate(-1.2deg) translateY(-3px);
  box-shadow: 0 12px 18px -12px rgb(16 27 74 / 0.4);
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease),
    background-color 0.3s,
    color 0.3s;
}

.person:nth-child(odd) {
  transform: rotate(1deg) translateY(-3px);
}

.person b {
  display: block;
  font-size: 1.1875rem;
  line-height: 1.15;
  white-space: nowrap;
}

.person small {
  display: block;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.person svg {
  order: 2;
  margin-left: auto;
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.person.is-read {
  background: var(--read);
  border: 2px solid var(--read);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.person path {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset 0.4s var(--ease) 0.2s;
}

.person.is-read path {
  stroke-dashoffset: 0;
}

.person.is-read small {
  color: #dcf3e5;
}

.demo-line {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.quiet {
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--corner);
  cursor: pointer;
}

.quiet:hover {
  background: var(--ink);
  color: #fff;
}

/* The whole sample card */

.anatomy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px clamp(28px, 5vw, 72px);
  align-items: start;
}

.anatomy-text {
  position: sticky;
  top: 32px;
}

.anatomy-text p + p {
  margin-top: 14px;
}

.full-card {
  border: 2px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
}

.full-card header {
  background: var(--child);
  padding: 22px 24px 24px;
}

.slot,
.full-card footer {
  padding: 20px 24px;
  border-top: 2px solid var(--tint);
}

.slot h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.slot ol {
  padding-left: 1.3em;
}

.by {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

.calls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.call,
.confirm {
  flex: 1;
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--corner);
  font-weight: 700;
  border: 2px solid var(--ink);
  padding: 0 14px;
  white-space: nowrap;
}

.call-112 {
  background: var(--act);
  border-color: var(--act);
  color: #fff;
}

.confirm {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}

.card-figure figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 12px;
}

/* Sharing */

.share h2 {
  font-size: clamp(1.875rem, 4.4vw, 3.5rem);
  line-height: 1.25;
  max-width: 22ch;
}

.nw {
  white-space: nowrap;
}

.chip {
  display: inline-block;
  background: var(--tint);
  color: var(--ink);
  border-radius: var(--corner);
  padding: 0 0.16em;
  line-height: 1.15;
  transform: rotate(-1.5deg);
}

.share .cols {
  margin-top: 28px;
}

/* Pen dates */

.timeline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline li {
  min-height: var(--unit);
  border: 2px solid var(--ink);
  border-radius: var(--corner);
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline b {
  font-size: 1.375rem;
  line-height: 1.1;
}

.timeline small {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.timeline .expiry {
  background: var(--ink);
  color: #fff;
}

.timeline .expiry small {
  color: var(--on-cobalt-soft);
}

.pens p {
  margin-top: 20px;
}

/* Limits */

.limits ul {
  list-style: none;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1.35;
}

.limits li {
  padding: 14px 0;
  border-top: 2px solid var(--tint);
}

.limits .not li {
  color: var(--ink-soft);
}

/* Schools, close, footer: back on the cobalt */

.schools,
.close {
  padding: clamp(56px, 8vw, 112px) calc(var(--gutter) + clamp(18px, 4vw, 56px)) 0;
}

.label-link {
  display: inline-block;
  margin-top: 28px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: var(--corner);
}

.label-link:hover {
  background: var(--child);
}

.close h2 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
}

.close .field {
  margin-top: 24px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding: clamp(56px, 8vw, 112px) calc(var(--gutter) + clamp(18px, 4vw, 56px)) 40px;
  font-size: 0.9375rem;
  color: var(--on-cobalt-soft);
}

@media (max-width: 860px) {
  .hero,
  .demo,
  .anatomy {
    grid-template-columns: minmax(0, 1fr);
  }

  .anatomy-text {
    position: static;
  }

  .top nav a:not(.nav-action) {
    display: none;
  }
}

@media (max-width: 420px) {
  .field {
    flex-direction: column;
  }

  .field input {
    min-height: 48px;
  }
}

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

  .person,
  .person path {
    transition: none;
  }
}
