/* Space Grotesk, served from this site instead of from Google, so a visitor's
   browser never has to announce itself to a third party to read the page.
   SIL Open Font License; the licence text sits next to the files. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-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;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* brand */
  --navy: #101D42;
  --blue: #232ED1;
  --accent: #7C84F2;   /* dark surfaces only: it fails contrast on paper */
  --badge: #C9CDF9;
  --paper: #F4F5F9;

  /* surfaces */
  --page: var(--paper);
  --surface: #FFFFFF;
  --tint: #E8EAF7;
  --code-bg: #ECEEF7;

  /* ink */
  --ink: var(--navy);
  --ink-soft: #4A5372;
  --ink-faint: #626A88;

  --rule: rgba(16, 29, 66, 0.14);
  --rule-strong: rgba(16, 29, 66, 0.22);
  --rule-dark: rgba(201, 205, 249, 0.18);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 2px; }
.slip a:focus-visible { outline-color: #fff; }

h1, h2, h3 { text-wrap: balance; }

/* hidden until a keyboard user tabs to it */
.skip {
  position: absolute; left: -999px; top: 0.75rem; z-index: 1;
  padding: 0.5rem 0.9rem; background: var(--surface); border-radius: 3px;
  font-weight: 500;
}
.skip:focus { left: 0.75rem; }

/* ---------- masthead ---------- */

/* wraps rather than pushing the page wider than the screen */
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem 1rem;
  padding-top: 1.5rem; padding-bottom: 1.5rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font-weight: 600; letter-spacing: -0.01em;
}
.brand svg { width: 1.75rem; height: auto; display: block; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.9375rem; font-weight: 500; }
.masthead nav a { position: relative; color: var(--ink-soft); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--ink); }
.masthead nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.35rem;
  height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left;
}
/* the section you are in keeps a heavier line, so it reads as "here", not as hover */
.masthead nav a[aria-current]::after { height: 2px; background: var(--blue); transform: scaleX(1); }
.masthead nav a:hover::after, .masthead nav a:focus-visible::after { transform: scaleX(1); }

/* ---------- hero: the claim on the left, the proof on the right ---------- */

.hero { display: grid; gap: 2.5rem; padding-top: 2.5rem; padding-bottom: 4rem; }

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1; font-weight: 700;
  letter-spacing: -0.035em;
}
.page-title h1 { font-size: clamp(2.1rem, 6vw, 3.25rem); line-height: 1.05; }
.lede {
  margin: 1.5rem 0 0; max-width: 32rem;
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  color: var(--ink-soft);
}
.crumb {
  display: inline-block; margin-bottom: 1.5rem;
  color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.crumb:hover { color: var(--blue); }

.actions, .cta-row {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  align-items: center; margin-top: 2rem;
}
.button {
  display: inline-block; padding: 0.8rem 1.35rem;
  background: var(--blue); color: #fff;
  font-weight: 600; text-decoration: none; border-radius: 4px;
}
.button:hover { background: #1A23A6; }
.support {
  display: inline-block; padding: 0.75rem 1.2rem;
  border: 1px solid var(--rule-strong); border-radius: 4px;
  color: var(--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
}
.support:hover { border-color: var(--blue); color: var(--blue); }

.facts {
  margin: 2rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2.25rem;
  font-size: 0.875rem;
}
.facts div { display: flex; gap: 0.5rem; }
.facts dt { color: var(--ink-faint); }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ---------- the slip: what a thing can and can never reach ---------- */

/* The one dark surface on a page. Navy, not blue, so white type on it does not
   vibrate and blue keeps meaning "you can click this". */
.slip { background: var(--navy); color: #fff; border-radius: 8px; overflow: hidden; font-size: 0.9375rem; }
.slip-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 0.25rem 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--rule-dark);
}
.slip-head p { margin: 0; font-size: 0.8125rem; color: var(--badge); }
.slip-head .kicker { flex-basis: 100%; color: var(--accent); }
.slip-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.slip-head h2 a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.4); }
.slip dl { margin: 0; }
.slip .line { display: grid; gap: 0.35rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--rule-dark); }
.slip dt { font-size: 0.8125rem; color: var(--badge); }
.slip dd { margin: 0; }
.slip ul { margin: 0; padding: 0; list-style: none; line-height: 1.5; }
.slip li { display: flex; gap: 0.6rem; padding: 0.15rem 0; }
.slip li::before { flex: none; width: 0.9rem; font-family: var(--mono); }
.slip .can li::before { content: "+"; color: var(--accent); }
.slip .cannot li { color: var(--badge); }
.slip .cannot li::before { content: "\2212"; color: rgba(201, 205, 249, 0.5); }
.slip .scope { font-family: var(--mono); font-size: 0.875rem; }
.slip-foot { margin: 0; padding: 0.9rem 1.4rem; font-size: 0.8125rem; color: var(--badge); }

/* ---------- clauses: numbered sections ---------- */

.clause { display: grid; gap: 0.75rem; padding-top: 3.5rem; padding-bottom: 3.5rem; border-top: 1px solid var(--rule); }
.num { margin: 0; font-family: var(--mono); font-size: 0.8125rem; color: var(--blue); }
.clause h2 {
  margin: 0 0 1rem; font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
}
.prose { max-width: 36rem; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose-before-list { margin-bottom: 2rem; }
.prose-after-list { margin-top: 2rem; }

/* ---------- the rules every plugin follows ---------- */

.rules { margin: 0; padding: 0; list-style: none; }
.rules li { display: grid; gap: 0.25rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.rules li:last-child { border-bottom: 1px solid var(--rule); }
.rules h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.rules p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; max-width: 40rem; }

/* ---------- the register: one row per plugin ---------- */

/* The permission is a column, not a footnote: it is what the site is about. */
.register { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.register th {
  text-align: left; font-weight: 500; font-size: 0.8125rem; color: var(--ink-faint);
  padding: 0 1rem 0.6rem 0; border-bottom: 2px solid var(--ink);
}
.register td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.register td:last-child, .register th:last-child { padding-right: 0; }
.register .name { color: var(--ink); font-weight: 600; text-decoration: none; }
.register .name:hover { color: var(--blue); text-decoration: underline; }
.register td p { margin: 0.25rem 0 0; color: var(--ink-soft); max-width: 26rem; }
.scopes { font-family: var(--mono); font-size: 0.8125rem; color: var(--blue); }

/* price badge, for the day a paid add-on exists */
.price {
  display: inline-block; padding: 0.25rem 0.6rem; border-radius: 999px;
  background: var(--badge); color: var(--navy);
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
}

/* ---------- lists of links ---------- */

.contact-list { margin: 0; padding: 0; list-style: none; max-width: 36rem; }
.contact-list li { border-top: 1px solid var(--rule); }
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }
.contact-list a {
  display: flex; flex-wrap: wrap; gap: 0 1rem;
  justify-content: space-between; align-items: baseline;
  padding: 0.9rem 0; color: var(--ink); text-decoration: none; font-weight: 500;
}
.contact-list a:hover { color: var(--blue); }
.contact-list span { font-weight: 400; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- plugin page parts ---------- */

/* numbered setup, because installing really is a sequence */
.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; max-width: 36rem; }
.steps li {
  counter-increment: step; position: relative;
  padding: 1.25rem 0 1.25rem 3rem; border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1.25rem; width: 1.75rem;
  font-family: var(--mono); font-size: 0.8125rem; color: var(--blue);
}
.steps h3 { margin: 0 0 0.35rem; font-size: 1.0625rem; font-weight: 600; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

code {
  font-family: var(--mono); font-size: 0.875em; color: var(--navy);
  background: var(--code-bg); border: 1px solid var(--rule); border-radius: 3px;
  padding: 0.1em 0.4em;
}

.codes { margin: 0; max-width: 40rem; }
.codes div { display: grid; gap: 0.4rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.codes div:last-child { border-bottom: 1px solid var(--rule); }
.codes dt { min-width: 0; }
.codes dt code { display: inline-block; max-width: 100%; overflow-x: auto; white-space: nowrap; padding: 0.4em 0.6em; }
.codes dd { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

.note {
  max-width: 36rem; margin: 2rem 0 0; padding: 1.25rem 1.5rem;
  background: var(--tint); border-left: 2px solid var(--blue); border-radius: 0 4px 4px 0;
}
.note h3 { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; }
.note p { margin: 0 0 0.75rem; font-size: 0.9375rem; color: var(--ink-soft); }
.note p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.page-footer {
  padding-top: 2.5rem; padding-bottom: 3rem; border-top: 1px solid var(--rule);
  font-size: 0.875rem; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
}
.page-footer p { margin: 0; }

/* ---------- phone: the register becomes stacked rows ---------- */

@media (max-width: 40rem) {
  .register thead { position: absolute; left: -999px; }
  .register tr { display: grid; gap: 0.2rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .register tbody tr:first-child { border-top: 2px solid var(--ink); }
  .register td { padding: 0; border: 0; }
  .register td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-faint); font-size: 0.8125rem; }
}

/* ---------- wider screens ---------- */

@media (min-width: 54rem) {
  body { font-size: 18px; }
  .masthead nav { gap: 1.5rem; }
  .hero { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; padding-top: 4rem; padding-bottom: 5.5rem; }
  .slip .line { grid-template-columns: 9rem 1fr; gap: 1rem; }
  .clause { grid-template-columns: 6rem 1fr; gap: 2rem; padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .num { padding-top: 0.55rem; }
  .rules li { grid-template-columns: 14rem 1fr; gap: 2rem; }
}

/* ---------- motion, only for those who have not asked for less ---------- */

@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, .button, .support { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
  .masthead nav a::after { transition: transform 0.18s ease; }
  .hero .slip { animation: settle 0.55s ease-out both 0.1s; }

  /* Clauses arrive as you reach them. Scroll-driven, so no JavaScript and no
     observer; browsers without the timeline simply show the page. The range ends
     early on purpose: by the time a block is halfway into the viewport it is done,
     so nothing you are trying to read is still moving or faint. */
  @supports (animation-timeline: view()) {
    .clause > div {
      animation: arrive linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 50%;
    }
  }
}
