/* Yoyo Yorùbá — legal pages
   Palette and type taken from the app itself: cream paper, sun yellow,
   coral, warm grey ink; Baloo 2 for display, Nunito for reading. */

:root {
  --paper: #FBF6EC;
  --card: #FFFFFF;
  --ink: #241F19;
  --ink-2: #6D6650;
  --sand: #DDD3BB;
  --sand-2: #EFE7D9;
  --sun: #FFC933;
  --sun-deep: #F2B41C;
  --coral: #FF6B5E;
  --coral-deep: #C9382C;
  --teal: #12786A;

  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --pad-x: clamp(20px, 5vw, 56px);
  --bar-h: 62px;
  --rail-w: 214px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; }
p { margin: 0; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--coral-deep); text-decoration-color: var(--coral-deep); }

:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: var(--pad-x);
  top: 10px;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
}

/* ── Bar ─────────────────────────────────────────────────────── */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--bar-h);
  padding: 10px var(--pad-x);
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand);
}

.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.mark img { display: block; flex: none; border-radius: 8px; }
.mark span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.mark:hover { color: var(--ink); }

.bar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bar-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  color: var(--ink-2);
}
.bar-nav a:hover { color: var(--ink); background: var(--sand-2); }
.bar-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--sun);
}

/* ── Masthead ────────────────────────────────────────────────── */

.head {
  padding: clamp(40px, 6vw, 76px) var(--pad-x) clamp(30px, 4vw, 44px);
  max-width: 1180px;
  margin: 0 auto;
}

.eyebrow {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.head h1 {
  font-weight: 800;
  font-size: clamp(40px, 7.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* Signature: the app speaking plainly to the parent, before the legalese. */
.short {
  position: relative;
  max-width: 640px;
  margin-top: clamp(28px, 3.6vw, 40px);
  padding: clamp(22px, 3vw, 30px) clamp(24px, 3.4vw, 34px);
  background: var(--sun);
  border-radius: 26px;
  box-shadow: 0 3px 0 var(--sun-deep);
}
.short::after {
  content: "";
  position: absolute;
  left: 46px;
  bottom: -17px;
  width: 36px;
  height: 18px;
  background: var(--sun);
  clip-path: polygon(0 0, 100% 0, 16% 100%);
}
.short-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6D5410;
  margin-bottom: 6px;
}
.short p {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.38;
  color: var(--ink);
  text-wrap: pretty;
}

/* ── Document layout ─────────────────────────────────────────── */

.doc {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 68ch);
  gap: clamp(36px, 5vw, 76px);
  justify-content: start;
  align-items: start;
  padding: clamp(34px, 4.5vw, 52px) var(--pad-x) clamp(56px, 7vw, 88px);
  max-width: 1180px;
  margin: 0 auto;
}

/* Contents rail */
.rail {
  position: sticky;
  top: calc(var(--bar-h) + 24px);
  max-height: calc(100vh - var(--bar-h) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rail-title {
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sand);
  margin-bottom: 6px;
}
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rail;
}
.rail li { counter-increment: rail; }
.rail a {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  padding: 7px 10px 7px 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
  border-radius: 0 8px 8px 0;
}
.rail a::before {
  content: counter(rail);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.75;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.rail a:hover { color: var(--ink); background: var(--sand-2); }
.rail a[aria-current="true"] {
  color: var(--ink);
  border-left-color: var(--coral);
  font-weight: 800;
}
.rail a[aria-current="true"]::before { color: var(--coral-deep); }

/* Mobile contents disclosure */
.rail-mobile { display: none; }

/* Prose */
.prose { min-width: 0; }
.prose > .intro {
  font-size: 18.5px;
  line-height: 1.7;
  color: var(--ink);
  padding-bottom: 8px;
}

.sec { padding-top: clamp(30px, 3.4vw, 42px); scroll-margin-top: calc(var(--bar-h) + 20px); }
.sec + .sec { border-top: 1px solid var(--sand); }
.sec h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(23px, 2.7vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.sec h2 .n {
  flex: none;
  font-family: var(--body);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--coral-deep);
  font-variant-numeric: tabular-nums;
  transform: translateY(-0.35em);
}
.sec p + p,
.sec ul + p,
.sec p + ul { margin-top: 16px; }

.prose ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.prose li::marker { color: var(--sand); }
.prose em { font-style: italic; color: var(--ink-2); }

/* A list of things that don't happen, marked as such. */
.nope {
  list-style: none;
  padding-left: 0;
  gap: 13px;
}
.nope li { position: relative; padding-left: 36px; }
.nope li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 20px;
  height: 20px;
  border: 2px solid var(--coral);
  border-radius: 50%;
}
.nope li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: calc(0.5em + 9px);
  width: 14px;
  height: 2px;
  background: var(--coral);
  transform: rotate(-45deg);
}

/* Contact card */
.contact-card {
  margin-top: 16px;
  padding: clamp(22px, 3vw, 28px);
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: 20px;
  line-height: 1.85;
}
.contact-card strong { font-weight: 800; }

.crosslink {
  margin-top: clamp(30px, 3.6vw, 40px);
  padding-top: 22px;
  border-top: 1px solid var(--sand);
  font-size: 16px;
  color: var(--ink-2);
}

/* ── Footer ──────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--sand);
  padding: 26px var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  max-width: 1180px;
  margin: 0 auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot a { color: var(--ink-2); text-decoration-color: var(--sand); }
.foot a:hover { color: var(--ink); text-decoration-color: var(--coral); }

/* ── Narrow ──────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rail { display: none; }
  .rail-mobile {
    display: block;
    margin-bottom: 28px;
    border: 1px solid var(--sand);
    border-radius: 16px;
    background: var(--card);
    overflow: hidden;
  }
  .rail-mobile summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .rail-mobile summary::-webkit-details-marker { display: none; }
  .rail-mobile summary::after {
    content: "+";
    font-size: 20px;
    line-height: 1;
    color: var(--coral-deep);
  }
  .rail-mobile[open] summary::after { content: "\2013"; }
  .rail-mobile ol {
    list-style: none;
    margin: 0;
    padding: 0 10px 12px;
    counter-reset: rail;
  }
  .rail-mobile li { counter-increment: rail; }
  .rail-mobile a {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 6px;
    padding: 9px 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
    border-radius: 8px;
  }
  .rail-mobile a::before {
    content: counter(rail);
    font-size: 12px;
    font-weight: 800;
    color: var(--sand);
  }
  .rail-mobile a:hover { background: var(--sand-2); color: var(--ink); }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .bar-nav a { padding: 0 11px; font-size: 14px; }
  .mark span { font-size: 17px; }
  .short { border-radius: 20px; }
}

/* ── Print ───────────────────────────────────────────────────── */

@media print {
  .bar, .rail, .rail-mobile, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .doc { display: block; padding: 0; }
  .short { background: none; box-shadow: none; border: 1pt solid #000; border-radius: 0; }
  .short::after { display: none; }
  a { color: #000; text-decoration: none; }
  .sec { page-break-inside: avoid; }
}
