/* Stress Codes site: shared tokens, header, footer, buttons. Colours from the logo:
   brain green #20b070, teal #12c9a3, deep green #003f20, charcoal #404040. */
:root {
  --bg: #08100d;
  --bg-2: #0d1713;
  --card: #111d18;
  --card-2: #16261f;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text: #eefaf4;
  --muted: #98b3a7;
  --green: #20b070;
  --teal: #12c9a3;
  --mint: #7debc4;
  --lime: #a3e36a;
  --deep: #003f20;
  --charcoal: #404040;
  --grad: linear-gradient(120deg, var(--teal), var(--green) 50%, var(--lime));
  --radius: 22px;
  --wrap: 1140px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: Fredoka, Nunito, system-ui, sans-serif; font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: rgba(32, 176, 112, .45); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 16, 13, .72);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 20px/1 Fredoka, sans-serif; }
.brand img { width: 38px; height: 38px; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: rgba(255, 255, 255, .06); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 800; font-size: 16px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s, box-shadow .25s, background .2s; font-family: inherit; color: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #03140c; box-shadow: 0 10px 30px -10px rgba(32, 176, 112, .8); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(18, 201, 163, .9); }
.btn-ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, .11); }

.play {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px;
  border-radius: 14px; background: #fff; color: #08100d; text-decoration: none; font-weight: 800;
  transition: transform .2s, box-shadow .25s; box-shadow: 0 10px 24px -14px rgba(255, 255, 255, .6);
}
.play:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(125, 235, 196, .8); }
.play svg { width: 22px; height: 22px; flex: none; }
.play small { display: block; font-size: 11px; font-weight: 700; color: #4d6158; line-height: 1.1; }
.play b { display: block; font-size: 17px; line-height: 1.15; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 15px; margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--text); }
.social { display: flex; gap: 10px; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: background .2s, transform .2s; }
.social a:hover { background: rgba(32, 176, 112, .2); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* Legal pages */
.legal { padding: 56px 0 24px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); }
.legal .meta { color: var(--muted); margin: 12px 0 28px; }
.legal .toc { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin-bottom: 36px; }
.legal .toc b { display: block; margin-bottom: 6px; }
.legal .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.legal .toc a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.legal .toc a:hover { color: var(--mint); }
.legal h2 { font-size: 26px; margin: 40px 0 12px; scroll-margin-top: 84px; }
.legal h3 { font-size: 19px; margin: 24px 0 8px; font-family: Nunito, sans-serif; font-weight: 800; }
.legal p, .legal li { color: #cfe2d9; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 6px 0; }
.legal a { color: var(--mint); font-weight: 700; }
.legal .table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
.legal th, .legal td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: #cfe2d9; }
.legal th { background: var(--card); color: var(--text); font-weight: 800; }
.legal tr:last-child td { border-bottom: 0; }
.legal .note { background: rgba(32, 176, 112, .1); border: 1px solid rgba(32, 176, 112, .3); border-radius: 14px; padding: 14px 18px; margin: 16px 0; }

@media (max-width: 560px) {
  .nav a.hide-sm { display: none; }
  .nav a { padding: 8px 9px; }
  .legal .toc ol { columns: 1; }
}
