/* inkykat terms, dark: a dark green sheet on dark-green stripes, read over by the cat in the corner. */
:root {
  /* dark inkykat: dark-green stripes, a deep dark green sheet, light green type */
  --stripe-a: #163a1c;
  --stripe-b: #1f4d26;
  --sheet: #0c1c0f;
  --line: #22402a;
  --stripe: #5f9e4c;      /* section numbers, list markers */
  --accent: #a8dc78;      /* the invite rule, links */
  --ink: #eef8e8;
  --muted: #a9c4a0;
  --cat-w: clamp(150px, 19vw, 300px);
  --sheet-w: 680px;
  --gutter: 3.25rem;           /* room for the big section numerals */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: repeating-linear-gradient(45deg, var(--stripe-a) 0 48px, var(--stripe-b) 48px 96px) fixed;
  color-scheme: dark;
  color: var(--ink);
  font: 400 1.0625rem/1.6 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Snowflakes fall behind the sheet, so they never cover the text. */
#snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* The sheet sits clear of the cat: centred when there's room, nudged right when there isn't. */
.sheet {
  width: min(var(--sheet-w), 100% - 2rem);
  margin: clamp(1rem, 6vh, 4.5rem) auto clamp(2rem, 8vh, 5rem);
  margin-left: max(calc(var(--cat-w) + 1.5rem), (100% - var(--sheet-w)) / 2);
  position: relative;
  z-index: 1;
  background: var(--sheet);
  border-radius: 6px 6px 28px 28px;
  padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.25rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem);
}

.head h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8.5vw, 4.25rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.head .for {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* The one rule that matters most, said in the type itself. */
.rule {
  margin: clamp(1.75rem, 5vw, 2.5rem) 0 0;
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 4px solid var(--accent);
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--accent);
  max-width: 22ch;
  text-wrap: balance;
}

.intro {
  margin: 1.25rem 0 0;
  max-width: 60ch;
}

/* Numbered sections: the numbers are real references ("see section 1"). */
.terms {
  list-style: none;
  counter-reset: term;
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
  padding: 0;
}
.terms > li {
  counter-increment: term;
  position: relative;
  padding: 1.35rem 0 0 var(--gutter);
  margin-top: 1.35rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1.5rem;
}
.terms > li::before {
  content: counter(term);
  position: absolute;
  left: 0;
  top: 0.95rem;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--stripe);
}
.terms > li:target::before { color: var(--accent); }
.terms h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 750;
  line-height: 1.3;
}
.terms p { margin: 0 0 0.7rem; max-width: 62ch; }
.terms p:last-child { margin-bottom: 0; }
.terms ul { margin: 0.3rem 0 0; padding-left: 1.15rem; max-width: 62ch; }
.terms ul li + li { margin-top: 0.3rem; }
.terms ul li::marker { color: var(--stripe); }

a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: #fff; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* The cat, bottom-left, looking up at the rules. It slides up once on load. */
.cat {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: var(--cat-w);
  height: auto;
  pointer-events: none;
  user-select: none;
  /* a soft green rim so the black cat doesn't vanish into the dark */
  filter: drop-shadow(0 0 1px rgba(212, 240, 188, .55)) drop-shadow(0 0 14px rgba(168, 220, 120, .28));
  animation: rise 600ms cubic-bezier(.22, .61, .36, 1) 200ms both;  /* smooth ease-out, no overshoot */
}
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .cat { animation: none; } }

/* Narrow screens: one column, and the cat sits at the end of the page instead of over the text. */
@media (max-width: 760px) {
  :root { --gutter: 2.4rem; }
  .sheet { margin-left: auto; margin-bottom: 0; }
  .terms > li::before { font-size: 2rem; top: 1.1rem; }
  .cat {
    position: static;
    display: block;
    width: clamp(130px, 42vw, 200px);
    margin: 0.75rem 0 0;
  }
}
