/* Springaroo's site. The app's own colours (src/theme.ts): the page #F7F9FB
   by day and #0B1116 at night, the deep water #0A5E85, sky blue #87CEEB and
   the joey's warm fur. Nunito is the wordmark's face, served from here. */

@font-face {
  font-family: 'Nunito';
  src: url('nunito.ttf') format('truetype');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #F7F9FB;
  --card: #FFFFFF;
  --ink: #1C2A33;
  --dim: #50636F;
  --line: #DCE6EC;
  --deep: #0A5E85;
  --sky: #87CEEB;
  --sky-wash: #E4F3FA;
  --fur: #E8A55C;
  --gap: #FFE7A8;
  --gap-ink: #6B4A00;
  --hero-top: #BFE0F0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1116;
    --card: #131C23;
    --ink: #EAF2F7;
    --dim: #A3B5C0;
    --line: #24323C;
    --deep: #87CEEB;
    --sky: #87CEEB;
    --sky-wash: #12232D;
    --gap: #4A3A10;
    --gap-ink: #FFE7A8;
    --hero-top: #10242F;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
}

a { color: var(--deep); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.preview {
  background: var(--gap);
  color: var(--gap-ink);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 8px 16px;
}

mark.gap {
  background: var(--gap);
  color: var(--gap-ink);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 700;
}

/* The top bar */
.top {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 36px; height: 36px; border-radius: 8px; display: block; }
.brand .wordmark { height: 24px; width: auto; display: block; }
.top nav { display: flex; gap: 18px; font-weight: 800; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }

/* The front page */
body.home { background: linear-gradient(var(--hero-top), var(--bg) 520px) no-repeat, var(--bg); }
.hero { text-align: center; padding-top: 24px; }
.hero .icon {
  width: 168px; height: 168px;
  border-radius: 22.4%;
  box-shadow: 0 10px 30px rgba(10, 94, 133, 0.25);
}
.hero h1 { margin: 28px 0 8px; line-height: 0; }
.hero h1 .wordmark { width: min(300px, 80vw); height: auto; }
.hero .lede { font-size: 20px; max-width: 560px; margin: 16px auto; }
.hero .store { color: var(--dim); font-weight: 700; }
.button {
  display: inline-block;
  background: var(--deep);
  color: var(--bg);
  text-decoration: none;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
}
.points {
  list-style: none;
  padding: 0;
  margin: 32px auto 0;
  max-width: 560px;
  display: grid;
  gap: 12px;
  text-align: left;
}
.points li {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky);
  border-radius: 12px;
  padding: 12px 16px;
}
.hero .note { color: var(--dim); font-size: 15px; margin-top: 28px; }

/* The documents */
.doc h1 { font-size: 34px; line-height: 1.2; font-weight: 900; color: var(--deep); margin: 16px 0 4px; }
.doc h1 + p { color: var(--dim); margin-top: 0; }
.doc h2 {
  font-size: 23px; line-height: 1.3; font-weight: 900;
  margin: 40px 0 8px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.doc h3 { font-size: 19px; font-weight: 800; margin: 28px 0 4px; }
.doc p, .doc li { max-width: 68ch; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.doc code { font-size: 0.9em; background: var(--sky-wash); padding: 1px 5px; border-radius: 4px; }
.doc blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--fur); background: var(--card); border-radius: 0 8px 8px 0; }

.table { margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--sky-wash); font-weight: 800; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 700; width: 30%; }
td:last-child { width: 22%; }

/* On a phone the table's rows stack as cards, each line named. */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .doc h1 { font-size: 28px; }
  .top nav { gap: 14px; }
  table, thead, tbody, tr, td { display: block; width: auto; }
  table { background: none; border: 0; }
  thead { display: none; }
  tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
  td { border-bottom: 0; padding: 4px 14px; width: auto !important; }
  td:first-child { padding-top: 12px; font-size: 16px; }
  td:last-child { padding-bottom: 12px; }
  td:not(:first-child)::before { content: attr(data-label) ': '; font-weight: 800; color: var(--dim); }
}

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}
footer p { margin: 4px 0; }
