/* Juice Pipe Connect legal pages. Copied to docs/legal/site/style.css by
   tool/build_legal_pages.py. Colours and fonts follow the game: orange sky,
   cream panels with brown outlines, gold accents, Baloo 2 and Nunito. */

@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cream: #fff4e0;
  --cream-2: #ffe9c4;
  --paper: #fffaf0;
  --brown: #5a3a22;
  --brown-2: #8a5a33;
  --wood: #b27a45;
  --orange: #ff8a00;
  --orange-d: #d45a00;
  --gold: #ffb400;
  --danger: #e5484d;
  --ink: #4a2f1b;
  --line: #ecd3a6;
  --font-title: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 4px 0 rgba(90, 58, 34, 0.35), 0 14px 28px rgba(120, 50, 0, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 17px/1.7 var(--font-body);
  background-color: #ff9a1f;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.22) 0 70px, transparent 71px),
    radial-gradient(circle at 92% 14%, rgba(255, 255, 255, 0.16) 0 110px, transparent 111px),
    radial-gradient(circle at 80% 46%, rgba(255, 255, 255, 0.10) 0 60px, transparent 61px),
    radial-gradient(circle at 6% 62%, rgba(255, 255, 255, 0.12) 0 90px, transparent 91px),
    radial-gradient(circle at 70% 90%, rgba(255, 255, 255, 0.12) 0 120px, transparent 121px),
    linear-gradient(180deg, #ffb24d 0%, #ff8f10 38%, #f2700a 100%);
  background-attachment: fixed;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--cream); color: var(--brown); font-weight: 800;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 32px, 860px); margin-inline: auto; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 10px; z-index: 10; margin-top: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 8px 10px 8px 8px;
  background: linear-gradient(180deg, #fffaf0, var(--cream));
  border: 3px solid var(--wood);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--brown); text-decoration: none;
  font: 800 19px/1 var(--font-title);
}
.brand img {
  width: 44px; height: 44px; border-radius: 12px;
  border: 2px solid var(--wood); background: var(--cream-2);
}
.brand span small { display: block; font: 700 12px/1.1 var(--font-body); color: var(--brown-2); margin-top: 3px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  color: var(--brown); text-decoration: none;
  font: 700 15px/1 var(--font-title);
  padding: 10px 15px 9px; border-radius: 999px;
  background: var(--cream-2); border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease;
}
.nav a:hover { background: #ffdca0; transform: translateY(-1px); }
.nav a[aria-current] {
  color: #fff; border-color: #a84300; text-shadow: 0 1px 0 rgba(120, 40, 0, 0.6);
  background: linear-gradient(180deg, #ffa733 0%, var(--orange) 45%, var(--orange-d) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 2px 0 rgba(120, 40, 0, 0.4);
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--brown); outline-offset: 3px; border-radius: 8px;
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 34px 0 22px; color: #fff; }
.hero .fruit { width: 84px; height: 84px; margin: 0 auto 6px; filter: drop-shadow(0 5px 0 rgba(120, 40, 0, 0.35)); }
.hero h1 {
  margin: 0; font: 800 clamp(34px, 7.5vw, 56px)/1.04 var(--font-title);
  color: #fff; letter-spacing: 0.01em;
  -webkit-text-stroke: 7px #a84300; paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(120, 40, 0, 0.45);
}
.hero .sub { margin: 14px auto 0; max-width: 34em; font: 800 18px/1.4 var(--font-body); text-shadow: 0 2px 0 rgba(120, 40, 0, 0.5); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 244, 224, 0.95); color: var(--brown);
  border: 2px solid var(--wood); font: 700 14px/1.3 var(--font-body);
}
.chip b { font-family: var(--font-title); font-weight: 800; color: var(--orange-d); margin-right: 4px; }

/* ---------- cards ---------- */
.card {
  position: relative; margin: 0 0 18px; padding: 22px 24px 20px;
  background: linear-gradient(180deg, var(--paper), var(--cream));
  border: 3px solid var(--wood); border-radius: 26px; box-shadow: var(--shadow);
}
.card::before {
  content: ""; position: absolute; inset: 5px; border-radius: 20px; pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.75);
}
.card > * { position: relative; }
.card > :last-child { margin-bottom: 0; }

.card h2 {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
  font: 800 clamp(22px, 4.6vw, 28px)/1.15 var(--font-title); color: var(--brown);
  scroll-margin-top: 96px;
}
.num {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font: 800 20px/1 var(--font-title); color: #fff; text-shadow: 0 1px 0 rgba(120, 40, 0, 0.6);
  background: radial-gradient(circle at 35% 28%, #ffd45c, var(--gold) 55%, #d98a00);
  border: 3px solid #b86a00; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 2px 0 rgba(120, 60, 0, 0.35);
}
.num svg { width: 22px; height: 22px; }
.card h3 { margin: 22px 0 6px; font: 800 19px/1.25 var(--font-title); color: var(--orange-d); }
p, ul, ol, .tablewrap { margin: 0 0 14px; }
strong { font-weight: 800; color: var(--brown); }
a { color: #b34700; text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 700; overflow-wrap: anywhere; }
a:hover { color: var(--orange-d); }

/* lists */
ul { list-style: none; padding: 0; }
ul li { position: relative; padding-left: 28px; margin: 7px 0; }
ul li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd45c, var(--orange)); border: 2px solid #b86a00;
}
ol { list-style: none; padding: 0; counter-reset: step; }
ol li { position: relative; counter-increment: step; padding-left: 44px; margin: 12px 0; min-height: 32px; }
ol li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 800 16px/1 var(--font-title); color: #fff;
  text-shadow: 0 1px 0 rgba(120, 40, 0, 0.6);
  background: linear-gradient(180deg, #ffa733, var(--orange-d)); border: 2px solid #a84300;
}

/* callout */
.callout {
  margin: 0 0 16px; padding: 14px 18px; border-radius: 18px;
  background: linear-gradient(180deg, #fff0c2, #ffe39a); border: 2px solid var(--gold);
  font-weight: 700; color: var(--brown);
}
.callout p { margin: 0; }

/* contents chips */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; padding: 0; }
.toc li::before { display: none; }
.toc a {
  display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--cream-2); border: 2px solid var(--line); color: var(--brown); text-decoration: none;
  font: 700 14px/1.2 var(--font-body);
}
.toc a i {
  font: 800 13px/1 var(--font-title); font-style: normal; color: #fff; min-width: 24px; height: 24px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 12px; background: var(--orange-d);
}
.toc a:hover { background: #ffdca0; border-color: var(--gold); }
.card .toc-title { margin-bottom: 10px; font: 800 20px/1.2 var(--font-title); color: var(--brown); }

/* tables */
.tablewrap { border: 2px solid var(--wood); border-radius: 16px; overflow: hidden; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.5; }
th {
  text-align: left; color: #fff; font: 800 15px/1.2 var(--font-title); padding: 10px 14px;
  background: linear-gradient(180deg, #ffa733, var(--orange-d)); text-shadow: 0 1px 0 rgba(120, 40, 0, 0.5);
}
td { padding: 12px 14px; vertical-align: top; border-top: 1px solid var(--line); }
tbody tr:nth-child(even) td { background: #fff7e6; }
td a { font-size: 14.5px; }

/* ---------- footer ---------- */
.foot {
  margin: 26px auto 40px; padding: 18px 20px; text-align: center;
  background: rgba(255, 244, 224, 0.96); border: 3px solid var(--wood); border-radius: 26px; box-shadow: var(--shadow);
  color: var(--brown-2); font: 700 15px/1.6 var(--font-body);
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 6px; }
.foot .top { display: inline-block; margin-top: 8px; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .bar { border-radius: 28px; justify-content: center; }
  .brand { margin-right: 0; width: 100%; justify-content: center; }
  .nav { justify-content: center; }
  .nav a { padding: 9px 12px 8px; font-size: 14px; }
  .hero { padding-top: 26px; }
  .hero h1 { -webkit-text-stroke-width: 6px; }
  .card { padding: 18px 16px 16px; border-radius: 22px; }
  .card::before { border-radius: 16px; }
  .num { width: 36px; height: 36px; font-size: 17px; }

  /* tables become stacked cards */
  .tablewrap { border: 0; background: none; border-radius: 0; overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { margin-bottom: 12px; background: #fff; border: 2px solid var(--wood); border-radius: 16px; overflow: hidden; }
  td, tbody tr:nth-child(even) td { background: #fff; border-top: 0; padding: 8px 14px; }
  td + td { border-top: 1px dashed var(--line); }
  td::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font: 800 12px/1.2 var(--font-title); text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange-d);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .bar, .skip, .foot .top, .toc-card { display: none; }
  .hero { color: #000; padding: 0 0 10px; }
  .hero h1 { color: #000; -webkit-text-stroke: 0; text-shadow: none; }
  .hero .sub { text-shadow: none; }
  .hero .fruit { display: none; }
  .card, .foot { box-shadow: none; border: 1px solid #999; background: #fff; break-inside: avoid-page; }
  .card::before { display: none; }
}
