/* SliceVerse website (site/pages.mjs). The game's set D look: dark charcoal studio, white text, gold accent, the
   cream cut line. One theme on purpose: it is the brand's look, and the game itself is dark. */
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #23262c;
  --bg-2: #2b2e35;
  --surface: #31353d;
  --surface-2: #3a3e47;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f2ec;
  --muted: #b3b5bc;
  --gold: #ffc846;
  --gold-ink: #1d1a14;
  --cream: #e8e1c7;
  --green: #a9cc4c;
  --radius: 18px;
  --wrap: 1120px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

img {
  height: auto; /* keep the width/height attributes for layout reservation, but scale with the width */
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #ffd977;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
}

h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  margin-top: 1.6em;
}

h3 {
  font-size: 21px;
  font-weight: 700;
  margin-top: 1.4em;
}

p,
ul,
ol,
table {
  margin: 0 0 1em;
}

li + li {
  margin-top: 0.35em;
}

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 8px 14px;
  border-radius: 10px;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(35, 38, 44, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand svg {
  width: 34px;
  height: 34px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: 700 17px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  color: var(--text);
  background: #454a55;
}

.btn.gold {
  background: var(--gold);
  color: var(--gold-ink);
  box-shadow: 0 8px 28px rgba(255, 200, 70, 0.25);
}

.btn.gold:hover {
  background: #ffd469;
  color: var(--gold-ink);
}

.btn.big {
  min-height: 58px;
  padding: 0 34px;
  font-size: 20px;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.top .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

@media (max-width: 760px) {
  .top .wrap {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-top: 8px;
  }
  .top .btn {
    margin-left: auto;
  }
  .nav {
    order: 3;
    width: calc(100% + 16px);
    margin: 4px -8px 6px;
  }
  .nav a {
    padding: 6px 10px;
    font-size: 14px;
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 56px 0 40px;
  background:
    radial-gradient(1200px 600px at 75% 20%, rgba(255, 200, 70, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 34em;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}

.facts li {
  margin: 0;
}

.facts li::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  margin: 0 8px 4px 0;
  background: var(--cream);
  transform: rotate(-30deg);
}

.phone {
  position: relative;
  width: min(100%, 380px); /* the embedded game needs ~360 px inside, like a real phone */
  margin-inline: auto;
  aspect-ratio: 9 / 16;
  border-radius: 34px;
  padding: 10px;
  background: #15171b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone > img,
.phone > iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 26px;
  object-fit: cover;
  background: #383c45;
}

.phone .play-here {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
}

@media (max-width: 860px) {
  .hero {
    padding: 32px 0 28px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .phone {
    width: min(64%, 260px);
  }
}

/* ---------- sections ---------- */
.section {
  padding: 56px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section > .wrap > h2:first-child,
.section > .narrow > h2:first-child {
  margin-top: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.steps li {
  margin: 0;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: s;
}

.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
}

.steps h3 {
  margin: 0 0 6px;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  color: var(--text);
  border-color: rgba(255, 200, 70, 0.5);
  transform: translateY(-2px);
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #383c45;
}

.card .body {
  padding: 14px 16px 18px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.card .tag {
  display: inline-block;
  margin-top: 10px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 860px) {
  .steps,
  .split {
    grid-template-columns: 1fr;
  }
}

.shot {
  border-radius: var(--radius);
  overflow: hidden;
  background: #383c45;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.shot img {
  width: 100%;
}

figure {
  margin: 0 0 1.4em;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 820px;
}

.shots img {
  border-radius: 14px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  width: 100%;
  background: #383c45;
}

/* ---------- article pages ---------- */
.page-head {
  padding: 40px 0 8px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.crumbs li {
  margin: 0;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  opacity: 0.5;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--text);
}

.meta {
  color: var(--muted);
  font-size: 15px;
}

.prose {
  padding-bottom: 48px;
}

.prose h2 {
  font-size: clamp(24px, 3vw, 30px);
}

.prose img {
  border-radius: 14px;
}

.prose strong {
  color: #fff;
}

.callout {
  margin: 1.4em 0;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: var(--surface);
}

.callout p:last-child {
  margin: 0;
}

.play-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2em 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #3a3e47, #31353d);
  border: 1px solid rgba(255, 200, 70, 0.25);
}

.play-box p {
  margin: 0;
  font-weight: 700;
  font-size: 19px;
}

.play-box span {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 1em;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.92em;
}

.item-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 8px;
}

.item-hero img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: #383c45;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.stats li {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
}

.stats b {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  color: var(--gold);
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 700px) {
  .item-hero {
    grid-template-columns: 1fr;
  }
  .item-hero img {
    width: min(100%, 320px);
  }
  .shots {
    gap: 8px;
  }
  .shots img {
    border-radius: 10px;
  }
}

/* phones: two cards per row */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .grid.wide {
    grid-template-columns: 1fr;
  }
  .card .body {
    padding: 10px 12px 14px;
  }
  .card h3 {
    font-size: 17px;
  }
  .card p {
    font-size: 14px;
  }
  .card .tag {
    font-size: 13px;
  }
  .section {
    padding: 40px 0;
  }
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  padding: 14px 32px 14px 0;
  font-weight: 700;
  font-size: 18px;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 10px;
  font-size: 26px;
  font-weight: 400;
  color: var(--gold);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  color: var(--muted);
}

/* the "cut the pancake" toy on /learn/ (public/s/cuts.js) */
.cuts-toy {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 28px;
  align-items: center;
  margin: 1.5em 0 2em;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
}

.cuts-toy svg {
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
}

.cuts-toy .out {
  font-size: 18px;
}

.cuts-toy .out b {
  color: var(--gold);
  font-size: 44px;
  line-height: 1;
  display: block;
}

.cuts-toy .row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.cuts-toy .btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}

@media (max-width: 760px) {
  .cuts-toy {
    grid-template-columns: 1fr;
  }
}

/* ---------- ads (only rendered when site/config.mjs has IDs) ---------- */
.ad {
  margin: 36px auto;
  text-align: center;
  min-height: 280px;
}

.ad::before {
  content: "Advertisement";
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- footer ---------- */
.foot {
  margin-top: 24px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  background: #1e2126;
  color: var(--muted);
  font-size: 15px;
}

.foot .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.foot h2 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.foot ul {
  padding: 0;
  list-style: none;
  margin: 0;
}

.foot li + li {
  margin-top: 6px;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

.foot a:hover {
  color: var(--text);
}

.social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
}

.social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.foot .legal {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 760px) {
  .foot .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .foot .about {
    grid-column: 1 / -1;
  }
}

.notfound {
  padding: 80px 0;
  text-align: center;
}

.notfound .cta {
  justify-content: center;
}

.card .dice {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 45%, #444955, #383c45 70%);
  color: var(--gold);
  font-size: clamp(56px, 12vw, 96px);
  font-weight: 800;
}

/* ---------- the leaderboard page (/leaderboard/) ---------- */
[data-board] {
  padding-bottom: 8px;
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}

.chips button {
  flex: none;
  padding: 8px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 600 15px var(--font);
  white-space: nowrap;
  cursor: pointer;
}

.chips button.on {
  border-color: var(--gold);
  color: var(--gold);
}

.board-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.board-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 17px;
}

.board-list li:nth-child(odd) {
  background: var(--surface);
}

.board-list li.me {
  background: rgba(255, 200, 70, 0.16);
  color: var(--gold);
  font-weight: 700;
}

.board-list .r {
  width: 2.4em;
  font-weight: 800;
  color: var(--muted);
}

.board-list li:nth-child(-n + 3) .r {
  color: var(--gold);
}

.board-list .n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-list .s {
  font-weight: 800;
}

.board-list li.wait,
.board-list li.gap {
  justify-content: center;
  background: none;
  color: var(--muted);
}

.board-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (min-width: 700px) {
  [data-board] .chips {
    flex-wrap: wrap;
  }
}
