/* refunds/, privacy/ and 404.html (lane trip-rules, prefix ru-). Refunds and Privacy: the page on its picture with two
   buttons, then six short white cards on mist. The 404: one line, the four doors as pictures, Book. Only kit tokens: no
   raw colour, no shadow by hand (heights are var(--depth-N)); the shades over pictures are made of the photo ground. */

/* ---------- The first screen (Refunds, Privacy) ---------- */
.ru-hero {
  display: grid;
  min-height: calc(100vh / var(--vz, 1));
  min-height: max(calc(100svh / var(--vz, 1)), 560px);
}
.ru-pic--sand img { object-position: 40% 50%; }
.ru-pic--fog img { object-position: 50% 50%; }
.ru-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--g-photo) 84%, transparent) 0%,
    color-mix(in srgb, var(--g-photo) 52%, transparent) 34%,
    color-mix(in srgb, var(--g-photo) 0%, transparent) 66%);
}
@media (min-width: 1024px) {
  .ru-hero::after {
    background:
      linear-gradient(to right,
        color-mix(in srgb, var(--g-photo) 58%, transparent) 0%,
        color-mix(in srgb, var(--g-photo) 0%, transparent) 56%),
      linear-gradient(to top,
        color-mix(in srgb, var(--g-photo) 70%, transparent) 0%,
        color-mix(in srgb, var(--g-photo) 0%, transparent) 50%);
  }
}
.ru-in {
  display: grid;
  align-content: end;
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: calc(var(--head-top) + var(--s-4)) var(--gutter) var(--s-6);
}
.ru-words { min-width: 0; max-width: 40rem; }
.ru-title {
  font-family: var(--f-head);
  font-weight: var(--w-head);
  font-size: var(--fs-title);
  line-height: 1;
  letter-spacing: var(--title-track);
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.ru-sub {
  max-width: 30ch;
  margin-top: var(--s-2);
  font-size: var(--fs-line);
  line-height: 1.45;
  font-weight: 500;
  color: var(--text);
  text-wrap: balance;
}
.ru-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
  margin-top: var(--s-4);
}
@media (min-width: 768px) {
  .ru-actions { display: flex; flex-wrap: wrap; }
}

/* ---------- The draft mark: quiet words and the kit's own .tbc beside them (a design marker, gone before going
   public). Muted and small like .tbc, never the action blue: it can't be pressed, so it must not look pressable. ---- */
.ru-draft-row { margin-top: var(--s-2); line-height: 2; } /* inline, so it follows .sec-head: centred on phones */
.ru-draft {
  margin-right: 4px;
  vertical-align: middle;
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- The rules: white cards on mist. Not pressable, so they never move ---------- */
.ru-card {
  display: grid;
  align-content: start;
  gap: var(--s-2);
  min-width: 0;
  padding: var(--s-3);
  border-radius: var(--radius);
  background: var(--g-paper);
  box-shadow: var(--depth-2);
}
@media (min-width: 768px) {
  .ru-card { padding: var(--s-4); }
}
.ru-list { display: grid; gap: 12px; padding: 0; margin: 0; }
.ru-list li {
  position: relative;
  min-width: 0;
  padding-left: 22px;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ru-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);   /* black, like Dave's site (Ry, 20 Nov 2026: "make them black") */
}
.ru-list .tbc { margin-left: 2px; }
.ru-note { margin-top: var(--s-1); }
.ru-law {
  max-width: 62ch;
  margin-top: var(--s-5);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}
.ru-more { margin-top: var(--s-3); }
.ru-law + .ru-more { margin-top: var(--s-2); }
.ru-card + .ru-more, .ru-cards + .ru-more { margin-top: var(--s-5); }
.ru-more .link { display: inline-flex; align-items: center; min-height: 48px; font-size: var(--fs-label); font-weight: 600; }

/* ---------- The 404: one line, four picture doors, Book ---------- */
.ru-lost .sec-head { margin-bottom: var(--s-5); }
.ru-doors { padding: 0; margin: 0; }
.ru-door {
  position: relative;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--depth-2);
  color: var(--g-paper);
  text-decoration: none;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.ru-door-pic { border-radius: var(--radius); }
.ru-door-pic::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--g-photo) 82%, transparent) 0%,
    color-mix(in srgb, var(--g-photo) 30%, transparent) 38%,
    color-mix(in srgb, var(--g-photo) 0%, transparent) 60%);
}
/* the name and its round arrow sit in the shade at the foot of the picture: the arrow says "press" with the height */
.ru-door-foot {
  position: absolute;
  left: var(--s-2);
  right: var(--s-2);
  bottom: var(--s-2);
  display: flex;
  align-items: flex-end;   /* the arrow on the foot in every door: a name on two lines rises, its last line stays level with the arrow */
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-1);
}
/* The name never breaks inside a word (Dan, 12 Nov 2026): it starts from its longest word (width: min-content), so
   when that word does not fit beside the arrow, the arrow goes under the name, in the same corner. */
.ru-door-name {
  flex: 1 1 auto;
  width: min-content;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  padding: .15em; margin: -.15em;   /* room inside the clip for letter tails and tops, same layout (Ry, 14 Nov 2026: "the G is cut off") */
  margin-bottom: calc((36px - 1.2em) / 2 - .15em);   /* its last line centred on the arrow (36 px), so the four names and arrows line up */
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.2;
  color: var(--g-paper);
}
.ru-door-go {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--g-mist);
  margin-left: auto;
  box-shadow: var(--depth-1);
  transition: background-color 200ms var(--ease);
}
.ru-door-go::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  transform: translate(-65%, -50%) rotate(45deg);
}
@media (min-width: 768px) {
  .ru-door-foot { left: var(--s-3); right: var(--s-3); bottom: var(--s-3); gap: var(--s-2); }
  .ru-door-name { font-size: var(--fs-card); margin-bottom: calc((48px - 1.2em) / 2 - .15em); }
  .ru-door-go { width: 48px; height: 48px; }
  .ru-door-go::after { width: 10px; height: 10px; }
}
/* the four doors keep one look across their row: where a real name (Lessons, Classes) no longer fits beside the
   arrow, every name gets the full row (two across below 360, four across from 768 to 1099) */
@media (max-width: 359.98px), (min-width: 768px) and (max-width: 1099.98px) {
  .ru-door-name { flex-basis: 100%; margin-bottom: -.15em; }
  /* the name now stands higher, so the shade reaches higher with it (the words keep their contrast) */
  .ru-door-pic::after {
    background: linear-gradient(to top,
      color-mix(in srgb, var(--g-photo) 82%, transparent) 0%,
      color-mix(in srgb, var(--g-photo) 72%, transparent) 50%,
      color-mix(in srgb, var(--g-photo) 0%, transparent) 92%);
  }
}
@media (hover: hover) {
  .ru-door:hover { box-shadow: var(--depth-3); transform: translateY(var(--lift)); }
  .ru-door:hover .ru-door-go { background: var(--blue); }
  .ru-door:hover .ru-door-go::after { border-color: var(--g-paper); }
}
.ru-door:active { box-shadow: var(--depth-down); transform: none; }
.ru-door:focus-visible { outline-offset: 4px; }
html.calm .ru-door, html.calm .ru-door:hover { transform: none; }
.ru-go { display: flex; justify-content: center; margin-top: var(--s-5); }
/* Missed a class leads the rules, its first line in bold (Lara and Dave, 22 Nov 2026: "The make up part... It's our
   biggest issue!"). Black on white like the rest: the weight and its place say it, never a colour or a box. The site's
   body size, so it is never smaller than the line under it */
.ru-lead {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 750;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}
