:root {
  --paper: #ffffff;
  --wash: #eef2f7;
  --ink: #1d2340;
  --ink-soft: #545b78;
  --rule: #d5dbe6;
  --pencil: #2f5fd0;
  --highlight: #ffe873;
  --flag: #c8322b;
  --serif: 'Alegreya', 'Iowan Old Style', Georgia, serif;
  --hand: 'Shantell Sans', 'Comic Neue', 'Segoe Print', cursive;
  --book: 'Literata', Georgia, serif;
  --wide: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--pencil);
  text-underline-offset: 0.18em;
}

h1,
h2,
h3 {
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}

h2 {
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--pencil);
  outline-offset: 3px;
  border-radius: 2px;
}

header.site,
footer.site,
main > section {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.wordmark {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

header.site nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 1rem;
}

header.site nav a {
  color: var(--ink);
  text-decoration: none;
}

header.site nav a:hover {
  color: var(--pencil);
}

.hero {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-block: clamp(2rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.2vw, 4.75rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  max-width: 12ch;
}

.lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.15em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.65em 1.3em;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

.button:hover {
  background: var(--wash);
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.primary:hover {
  background: var(--pencil);
  border-color: var(--pencil);
}

.manuscript {
  margin: 0;
  display: grid;
  gap: 1.25rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--wash);
  border-radius: 10px;
}

.sheet {
  background: var(--paper);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border-radius: 3px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgb(29 35 64 / 0.35);
  font-family: var(--book);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  line-height: 1.7;
}

.sheet p + p {
  text-indent: 1.4em;
}

.sheet .sheet-head {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
  text-indent: 0;
}

.sheet mark,
.sheet .fix ins {
  color: inherit;
  background: linear-gradient(var(--highlight), var(--highlight)) no-repeat 0 60% / 100% 70%;
  padding: 0 0.1em;
  text-decoration: none;
}

.sheet sup {
  font-family: var(--hand);
  font-weight: 500;
  color: var(--pencil);
  font-size: 0.7em;
  margin-left: 0.15em;
}

.sheet del {
  color: var(--ink-soft);
  text-decoration: line-through 2px var(--flag);
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  counter-reset: note;
  font-family: var(--hand);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--pencil);
}

.notes li {
  counter-increment: note;
  display: grid;
  grid-template-columns: 1.4rem 1fr;
}

.notes li::before {
  content: counter(note);
  font-weight: 500;
}

.notes li:nth-child(2) {
  rotate: -0.6deg;
}

.notes .flag {
  color: var(--flag);
}

@media (min-width: 40rem) {
  .manuscript {
    grid-template-columns: 1fr 13rem;
    align-items: start;
  }

  .notes {
    padding-top: 2.5rem;
    gap: 2.25rem;
  }
}

@media (min-width: 64rem) {
  .hero {
    grid-template-columns: 5fr 7fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sheet mark,
  .sheet .fix ins {
    animation: highlight 0.6s cubic-bezier(0.3, 0.7, 0.2, 1) both;
    animation-delay: calc(0.5s + var(--i, 1) * 0.55s);
  }

  .sheet .fix del {
    animation: strike 0.4s ease-out both;
    animation-delay: calc(0.2s + var(--i, 1) * 0.55s);
  }

  .notes li {
    animation: note 0.5s ease-out both;
    animation-delay: calc(0.75s + var(--i, 1) * 0.55s);
  }
}

@keyframes highlight {
  from {
    background-size: 0% 70%;
  }
}

@keyframes strike {
  from {
    text-decoration-color: transparent;
  }
}

@keyframes note {
  from {
    opacity: 0;
    translate: -6px 0;
  }
}

main > section + section {
  border-top: 1px solid var(--rule);
}

.problem,
.how,
.memory,
.book,
.connect {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.problem {
  display: grid;
  gap: 1.25rem;
}

.problem p {
  max-width: 40rem;
  font-size: 1.2em;
  line-height: 1.55;
}

@media (min-width: 64rem) {
  .problem {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }
}

.steps {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 2.5rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.steps li::before {
  content: counter(step);
  font-family: var(--hand);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--pencil);
}

.steps h3 {
  font-size: 1.4rem;
}

.steps p {
  color: var(--ink-soft);
  max-width: 24rem;
}

@media (min-width: 52rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.memory {
  display: grid;
  gap: 2.5rem;
}

.memory-intro p {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 32rem;
}

.memory dl {
  margin: 0;
  display: grid;
  gap: 0;
}

.memory dl > div {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0.25rem;
}

.memory dt {
  font-weight: 700;
}

.memory dd {
  margin: 0;
  color: var(--ink-soft);
}

.guard {
  font-family: var(--hand);
  color: var(--pencil);
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 34rem;
  padding-left: 1rem;
  border-left: 2px solid var(--pencil);
}

@media (min-width: 52rem) {
  .memory dl {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
}

@media (min-width: 64rem) {
  .memory {
    grid-template-columns: 5fr 7fr;
    column-gap: 4rem;
  }

  .memory dl {
    grid-row: span 2;
  }

  .guard {
    align-self: start;
  }
}

.book {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.book-copy {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
}

.book-copy p {
  color: var(--ink-soft);
}

.device {
  justify-self: center;
  width: min(100%, 20rem);
  padding: 0.7rem;
  border-radius: 2.4rem;
  background: var(--ink);
  box-shadow: 0 30px 60px -30px rgb(29 35 64 / 0.6);
}

.screen {
  border-radius: 1.8rem;
  background: #f6efe2;
  color: #2a231d;
  padding: 2.25rem 1.4rem 2.5rem;
  font-family: var(--book);
  font-size: 0.85rem;
  line-height: 1.65;
  min-height: 30rem;
}

.r-num {
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: #8a3b2b;
}

.r-title {
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0.35rem 0 1.25rem;
}

.r-art svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 1.1rem;
}

.r-text::first-letter {
  float: left;
  font-size: 3em;
  line-height: 0.85;
  padding: 0.05em 0.08em 0 0;
  color: #8a3b2b;
}

@media (min-width: 52rem) {
  .book {
    grid-template-columns: 7fr 5fr;
  }
}

.connect > p {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 38rem;
}

.clients {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  max-width: 44rem;
}

.clients li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.clients li:last-child {
  border-bottom: 1px solid var(--rule);
}

.clients strong {
  font-size: 1.2rem;
  font-weight: 500;
}

.clients span {
  font-family: var(--hand);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

footer.site {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 1rem;
}

.mcp-url code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0.5em 0.8em;
  border: 1.5px dashed var(--pencil);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  user-select: all;
}

.connect .mcp-url {
  margin-top: 1.25rem;
}

.panel {
  max-width: 34rem;
  padding-block: clamp(2.5rem, 8vw, 5rem);
  display: grid;
  gap: 1rem;
  align-content: start;
}

.panel.wide {
  max-width: 44rem;
}

.panel h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  letter-spacing: -0.01em;
}

.panel h2 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
}

.panel .actions {
  margin-top: 0.5rem;
}

.stack {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.stack label {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  font-weight: 500;
  font-size: 1rem;
}

.stack input {
  font: inherit;
  font-size: 1.05rem;
  padding: 0.6em 0.75em;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
}

.stack input:focus {
  border-color: var(--pencil);
  outline: none;
  box-shadow: 0 0 0 3px rgb(47 95 208 / 0.18);
}

button.button {
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  background: var(--paper);
}

button.button.primary {
  background: var(--ink);
}

button.link {
  font: inherit;
  color: var(--pencil);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

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

.notice {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--pencil);
  background: var(--wash);
  font-size: 1rem;
}

.notice.error {
  border-color: var(--flag);
}

.notice.dev {
  font-family: var(--hand);
  font-size: 0.95rem;
}

.ticks {
  margin: 0;
  padding-left: 1.2rem;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}

.rows li:last-child {
  border-bottom: 1px solid var(--rule);
}

.rows span {
  display: grid;
  gap: 0.15rem;
}

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

.panel > form:empty {
  display: none;
}

.clients a {
  font-family: var(--hand);
  font-size: 0.95rem;
}

.guide {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5rem);
}

.guide header {
  display: grid;
  gap: 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.guide h1 {
  font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.4rem);
  letter-spacing: -0.015em;
}

.guide .lede {
  margin-top: 0;
}

.crumb {
  font-size: 1rem;
}

.checked {
  font-family: var(--hand);
  font-size: 0.9rem;
  color: var(--pencil);
}

.guide-section {
  display: grid;
  gap: 1rem;
  padding-top: 2.5rem;
}

.guide-section h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem);
}

.guide-section ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.guide-steps {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.75rem;
}

.guide-steps > li {
  counter-increment: step;
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding-left: 3rem;
}

.guide-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.2rem;
  font-family: var(--hand);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--pencil);
}

.guide-steps h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.guide-steps p,
.guide-section > p,
.faq dd {
  color: var(--ink-soft);
}

.guide-steps .mcp-url {
  margin: 0.25rem 0;
}

.ui {
  font-weight: 500;
  color: var(--ink);
  background: var(--wash);
  padding: 0.05em 0.35em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.prompt {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--highlight);
  border-radius: 4px;
  font-family: var(--book);
  font-size: 1rem;
  line-height: 1.6;
  user-select: all;
}

.faq {
  margin: 0;
}

.faq dt {
  font-weight: 700;
  margin-top: 1.25rem;
}

.faq dt:first-child {
  margin-top: 0;
}

.faq dd {
  margin: 0.25rem 0 0;
}
