:root {
  --ground: #ffffff;
  --ink: #111111;
  --text: #2a2a2a;
  --muted: #5c5c5c;
  --rule: #e8e8e8;
  --link: #2b59c3;
  --rule-strong: #cfcfcf;
  --marker: #9a9a9a;
  --selection: #dbe4f7;
  --scrollbar: #c9c9c9;
  --icon-moon: block;
  --icon-sun: none;
  color-scheme: light;
  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121314;
    --ink: #f2f2ef;
    --text: #d4d4d0;
    --muted: #9b9b97;
    --rule: #2a2c2e;
    --rule-strong: #43464a;
    --link: #8eaefc;
    --marker: #6f6f6c;
    --selection: #26365a;
    --scrollbar: #3a3c3f;
    --icon-moon: none;
    --icon-sun: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #121314;
  --ink: #f2f2ef;
  --text: #d4d4d0;
  --muted: #9b9b97;
  --rule: #2a2c2e;
  --rule-strong: #43464a;
  --link: #8eaefc;
  --marker: #6f6f6c;
  --selection: #26365a;
  --scrollbar: #3a3c3f;
  --icon-moon: none;
  --icon-sun: block;
  color-scheme: dark;
}

/* Reading size: A− / A+ on desktop scale text, column and image together */
@media (min-width: 900px) and (pointer: fine) {
  :root[data-size="0"] { font-size: 87.5%; }
  :root[data-size="2"] { font-size: 112.5%; }
  :root[data-size="3"] { font-size: 125%; }
  :root[data-size="4"] { font-size: 137.5%; }
}

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

html {
  cursor: url("cursors/cat.svg") 4 3, auto;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--scrollbar) var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a,
summary { cursor: url("cursors/paw.svg") 16 3, pointer; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
}
.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
}
.not-sf {
  margin: 0;
  color: var(--text);
}
.site-header-end {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-nav {
  display: flex;
  gap: 1rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.site-tools {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.size-tools {
  display: none;
  gap: 0;
}
@media (min-width: 900px) and (pointer: fine) {
  .size-tools { display: flex; }
}
.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 2rem;
  padding: 0 0.125rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  line-height: 1;
  cursor: url("cursors/paw.svg") 16 3, pointer;
}
.tool:hover { color: var(--link); }
.tool:disabled {
  opacity: 0.35;
  cursor: url("cursors/cat.svg") 4 3, default;
}
.tool svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 480px) {
  .site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.625rem 0.75rem;
  }
  .site-header-end { display: contents; }
  .not-sf { grid-area: 1 / 1; }
  .btn-header { grid-area: 1 / 2; }
  .site-nav { grid-area: 2 / 1; gap: 0.875rem; }
  .site-tools { grid-area: 2 / 2; justify-self: end; }
  .theme-toggle { margin-right: -0.25rem; }
}
/* Desktop: the header runs wider than the reading column so it can breathe */
@media (min-width: 900px) {
  .site-header-inner {
    max-width: calc(var(--measure) + 14rem + 2 * var(--gutter));
    column-gap: clamp(1rem, 2.2vw, 2rem);
  }
  .site-header-end { gap: clamp(1rem, 2.4vw, 2.25rem); }
  .site-nav { gap: clamp(1rem, 1.8vw, 1.75rem); }
  .site-tools { gap: 0.25rem; }
}
.theme-toggle .icon-moon { display: var(--icon-moon); }
.theme-toggle .icon-sun { display: var(--icon-sun); }

/* Sign-up button: the one solid control on the page */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.9em;
  border-radius: 8px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.btn:hover {
  background: var(--link);
  color: var(--ground);
}
.btn svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover svg { transform: translateX(3px); }
.btn-header { padding: 0.45em 0.8em; }
.btn-large {
  margin-top: 0.5rem;
  padding: 0.75em 1.15em;
}
@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn svg { transition: none; }
}

/* Note */
.note {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(3.5rem, 12vh, 7.5rem) var(--gutter) 4rem;
}

h1,
h2 {
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  margin: 0 0 1.75rem;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
h2 {
  margin: 3.25rem 0 0.75rem;
  font-size: 1.375rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; text-wrap: pretty; }
.lede { color: var(--ink); }

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
li { margin-bottom: 0.35rem; padding-left: 0.25rem; }
li::marker { color: var(--marker); }

.status {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.status strong { color: var(--ink); font-weight: 600; }

blockquote {
  margin: 1.5rem 0;
  padding: 0.125rem 0 0.125rem 1.25rem;
  border-left: 1px solid var(--ink);
}
blockquote p {
  margin: 0;
  color: var(--ink);
  font-size: 1.1875rem;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.principles { margin-top: 3.25rem; }
.principles p { margin-bottom: 1.5rem; }
.principles strong { color: var(--ink); font-weight: 600; }

.still {
  margin: 3.25rem 0 0;
}
.still-frame { overflow: hidden; }
.still img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ink);
}
.still figcaption {
  margin-top: 0.625rem;
  font-size: 0.875rem;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

/* FAQ */
.qa {
  margin-bottom: 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--ground);
  transition: border-color 160ms ease-out;
}
.qa:hover,
.qa[open] { border-color: var(--rule-strong); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.125rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
  border-radius: 8px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.qa[open] summary::after {
  margin-top: 0.25rem;
  transform: rotate(-135deg);
}
.qa p {
  margin: 0;
  padding: 0 1.125rem 1rem;
}
@supports (interpolate-size: allow-keywords) {
  .qa { interpolate-size: allow-keywords; }
  .qa::details-content {
    height: 0;
    overflow: clip;
    transition: height 240ms cubic-bezier(0.16, 1, 0.3, 1), content-visibility 240ms allow-discrete;
  }
  .qa[open]::details-content { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .qa,
  .qa summary::after,
  .qa::details-content { transition: none; }
}

/* Motion: hidden only while the animation script is about to run */
.will-animate .note > h1,
.will-animate .note > .lede,
.will-animate .note > .still,
.will-animate .note > .status,
.will-animate .note section > * { opacity: 0; }
.note > h1 .word { display: inline-block; }

/* Footer */
.site-footer {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.site-footer p { margin: 0; }
