/* Legal pages on the landing page's look. Loads after landing.css and uses its tokens and keys. */
.back span {
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.25s var(--out);
}
.back:hover span {
  transform: translateX(-4px);
}
.legal {
  padding-block: 40px 88px;
}
.legal-head {
  max-width: 760px;
  padding-bottom: 40px;
}
.legal-head .kicker {
  margin: 0;
}
.legal h1 {
  margin-top: 10px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 1;
}
.subtitle {
  margin-top: 18px;
  font-size: clamp(19px, 1.7vw, 22px);
  color: var(--muted);
}
.legal-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 56px;
}

/* The side rail: where you are, and the one thing you may have come for. */
.rail {
  position: sticky;
  top: 100px;
}
.rail {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: none;
}
.toc summary {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  list-style: none;
  pointer-events: none;
}
.toc summary::-webkit-details-marker {
  display: none;
}
/* Reading progress, added by legal.js. */
.read-bar {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
}
.rail nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0 6px 16px;
  line-height: 1.25;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, transform 0.25s var(--out);
}
.rail nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 3px;
  background: var(--orange);
  transform: scaleY(0);
  transition: transform 0.3s var(--spring);
}
.rail nav a:hover {
  color: var(--ink);
  transform: translateX(2px);
}
.rail nav a.current {
  color: var(--ink);
  font-weight: 700;
}
.rail nav a.current::before {
  transform: scaleY(1);
}
.rail-key {
  width: 100%;
  margin-top: 22px;
}

/* Body */
.legal-body {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 820px;
}
.block {
  padding-block: 10px;
  scroll-margin-top: 96px;
}
.legal h2 {
  margin: 0 0 12px;
  font-size: clamp(25px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.block p {
  color: var(--muted);
}
.block strong {
  font-weight: 700;
  color: var(--ink);
}
.card {
  padding: clamp(22px, 3vw, 32px);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 24px 50px -36px #5a432966;
}
.card-warn {
  background: var(--tint);
  box-shadow: none;
}
.card-warn p {
  color: #5c4436;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

/* Steps: numbered discs on one line, like the app's timeline. */
.steps {
  position: relative;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 20px;
}
.step:last-child {
  padding-bottom: 0;
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 4px;
  border-left: 2.5px dotted #c9bcaa;
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--orange-copy);
  font-weight: 800;
  transition: transform 0.45s var(--spring);
}
.js .reveal:not(.in) .step-num {
  transform: scale(0.5);
}
.step:nth-child(2) .step-num {
  transition-delay: 0.12s;
}
.step:nth-child(3) .step-num {
  transition-delay: 0.24s;
}
.step-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-top: 5px;
}
.copy-key {
  flex: none;
  min-width: 76px;
  min-height: 44px;
  margin-top: -9px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--track);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--spring), background-color 0.2s;
}
.copy-key:hover {
  background: #e8decf;
}
.copy-key:active {
  transform: scale(0.94);
}
.copy-key.done {
  background: #cfe8d6;
  color: #1d6b3a;
}

/* What happens after: in order, on a line. */
.timeline {
  margin-top: 16px;
  list-style: none;
}
.timeline li {
  position: relative;
  padding: 0 0 18px 30px;
  color: var(--muted);
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
}
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 24px;
  bottom: 2px;
  border-left: 2.5px dotted #c9bcaa;
}

/* What goes and what stays. */
.marks {
  list-style: none;
}
.marks li {
  position: relative;
  padding: 11px 0 11px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.4;
}
.marks li::before,
.marks li::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 15px;
  height: 2.5px;
  border-radius: 2px;
  transition: transform 0.4s var(--spring);
}
.marks-gone li::before,
.marks-gone li::after {
  background: var(--orange);
}
.marks-gone li::before {
  transform: rotate(45deg);
}
.marks-gone li::after {
  transform: rotate(-45deg);
}
.js .reveal:not(.in) .marks-gone li::before,
.js .reveal:not(.in) .marks-gone li::after {
  transform: rotate(0) scaleX(0.2);
}
.marks-kept li::before {
  background: var(--faint);
}
.marks-kept li::after {
  display: none;
}
.callout {
  margin-top: 14px;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--card);
}
.callout-title {
  font-weight: 700;
  color: var(--ink) !important;
}
.legal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
}

/* Long documents: Privacy and Terms. */
.legal-doc .legal-body {
  gap: 0;
  max-width: 760px;
}
.legal-doc .block {
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.legal-doc .block:first-child {
  padding-top: 0;
  border-top: 0;
}
.block > * + * {
  margin-top: 12px;
}
.block > h2 + * {
  margin-top: 0;
}
.block h3 {
  margin: 22px 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.block > ul:not(.timeline):not(.marks) {
  list-style: none;
  color: var(--muted);
}
.block > ul:not(.timeline):not(.marks) > li {
  position: relative;
  padding: 5px 0 5px 22px;
}
.block > ul:not(.timeline):not(.marks) > li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}
.block a:not(.key) {
  font-weight: 600;
  color: var(--orange-copy);
}
.upper {
  text-transform: uppercase;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

@media (max-width: 920px) {
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .rail {
    position: static;
  }
  .rail {
    max-height: none;
    overflow: visible;
  }
  .toc {
    margin-bottom: 14px;
    border-radius: 16px;
    background: var(--card);
  }
  .toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    margin: 0;
    padding: 0 18px;
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
    pointer-events: auto;
    cursor: pointer;
  }
  .toc summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2.5px solid var(--orange);
    border-bottom: 2.5px solid var(--orange);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s var(--spring);
  }
  .toc[open] summary::after {
    transform: translateY(2px) rotate(225deg);
  }
  .toc nav {
    padding: 0 18px 12px;
  }
  .rail nav a {
    min-height: 44px;
  }
  .rail-key {
    margin: 0 0 14px;
  }
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .legal {
    padding-top: 20px;
  }
  .legal-cta .key {
    width: 100%;
  }
  .step-row {
    flex-direction: column;
    gap: 10px;
  }
  .copy-key {
    margin-top: 0;
  }
}
