/* PlanetSprite's own pages on planetsprite.com (terms, privacy, rules, your data): the home page's
   look (home.css) in a quieter key. Its fonts (Baloo 2 headings, Nunito text, fonts/OFL-*.txt), its
   colours, a night top bar with the Play button, and the long text on a soft paper sheet, set
   narrow and roomy so it stays easy to read. */
@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;
  --paper: #fffaf3;
  --paper-2: #f5ede1;
  --ink: #261d3a;
  --ink-soft: #4f4562;
  --ink-faint: #8a8199;
  --leaf: #3dbb68;
  --leaf-2: #239552;
  --leaf-deep: #17703b;
  --sun: #ffc94d;
  --night: #19132b;
  --line: rgba(38, 29, 58, 0.12);
  --shadow: 0 30px 70px -36px rgba(38, 29, 58, 0.4), 0 10px 24px -16px rgba(38, 29, 58, 0.25);
  --display: "Baloo 2", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  --text: Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(61, 187, 104, 0.12), transparent 70%),
    radial-gradient(800px 420px at 90% 0%, rgba(90, 174, 255, 0.14), transparent 70%),
    var(--paper-2);
  color: var(--ink);
  font: 17px / 1.75 var(--text);
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.bar-brand img {
  image-rendering: pixelated;
}

/* ── The top bar ── */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(25, 19, 43, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -20px rgba(10, 6, 20, 0.6);
}

.bar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  max-width: 1200px;
  min-height: 68px;
  margin: 0 auto;
  padding: 10px 24px;
}

.bar-brand {
  display: flex;
  flex: 0 0 auto;
}

.bar-brand img {
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  font: 700 15px / 1 var(--text);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(to bottom, #5ad37f 0%, var(--leaf) 45%, var(--leaf-2) 100%);
  box-shadow:
    0 12px 26px -12px rgba(35, 149, 82, 0.8),
    inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  font: 800 16px / 1 var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.btn-play::before {
  content: "";
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.btn-play:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

/* ── The reading sheet ── */
main {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 48px 16px 72px;
}

.panel {
  padding: clamp(24px, 6vw, 64px);
  border-radius: 28px;
  background: #fff;
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--line);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
}

h2 {
  margin: 44px 0 8px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: clamp(24px, 3vw, 30px);
}

h3 {
  margin: 26px 0 4px;
  font-size: 21px;
}

.updated {
  margin: 0 0 22px;
  color: var(--ink-faint);
  font-size: 15px;
  font-weight: 700;
}

.lead {
  font-size: 19px;
  color: var(--ink-soft);
}

p,
li {
  color: var(--ink-soft);
}

strong {
  color: var(--ink);
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 6px;
}

li::marker {
  color: var(--leaf-2);
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--paper-2);
  font-size: 0.92em;
}

table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 16px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.note {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--paper-2);
  box-shadow: inset 4px 0 0 var(--leaf);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.card {
  display: block;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow:
    0 14px 30px -22px rgba(38, 29, 58, 0.5),
    inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.card strong {
  display: block;
  margin-bottom: 2px;
  font: 800 22px / 1.2 var(--display);
}

/* ── Footer ── */
.footer {
  padding: 30px 16px 34px;
  background: var(--night);
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  text-align: center;
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 760px) {
  .bar-in {
    padding: 10px 16px;
  }
  .bar-brand .bar-logo {
    display: none;
  }
  .nav {
    order: 3;
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
  }
  .nav a {
    padding: 8px 8px;
  }
  .btn-play {
    margin-left: auto;
  }
  main {
    padding-top: 24px;
  }
}

@media (min-width: 761px) {
  .bar-brand .bar-planet {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav a,
  .btn-play,
  .card {
    transition: none;
  }
  .btn-play:hover,
  .card:hover {
    transform: none;
  }
}
