:root {
  --primary: #222;
  --secondary: #fff;
  --primary-rgb: 34, 34, 34;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media screen and (min-width: 768px)  { html { font-size: 14.5px; } }
@media screen and (min-width: 1152px) { html { font-size: 17px; } }
@media screen and (min-width: 1536px) { html { font-size: 20px; } }

body {
  font-family: Didactic, -apple-system, Helvetica, sans-serif;
  background: var(--secondary, #fff);
  color: var(--primary, #222);
  transition: background .2s linear, color .2s linear;
}

button {
  border: none;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  background: var(--secondary, #fff);
}

.clickable { user-select: none; cursor: pointer; }

/* ============ frame ============ */
.frame {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
}
@media screen and (min-width: 400px) {
  .frame {
    bottom: 3rem;
    border-bottom: 3px solid var(--primary, #222);
  }
}
@media screen and (min-width: 1000px) {
  .frame {
    border: 3px solid var(--primary, #222);
    top: 1rem; left: 2rem; right: 2rem;
  }
}

.scroller {
  height: 100%;
  overflow-y: auto;
}
::-webkit-scrollbar { display: none; width: 0; background: transparent; }

.content {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ============ hero ============ */
.hero {
  text-align: center;
  padding: 2rem 0 1rem;
}
.hero-spoon {
  font-size: 4rem;
  line-height: 1;
}
.hero h1 {
  font-size: 5rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
  letter-spacing: 1px;
}
.tagline {
  font-size: 1.4rem;
  margin: 0;
  opacity: .7;
}

/* ============ rules ============ */
.rules-col {
  margin-top: 3rem;
}
.rules-lang {
  display: inline-block;
  font-family: Mono, monospace;
  font-size: .9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 3px solid var(--primary, #222);
  padding: .6rem .8rem .4rem;
}
.rules-col h2 {
  font-size: 2.4rem;
  margin: 1.2rem 0 1rem;
}

.need-box {
  font-size: 1.2rem;
  border: 1px dotted var(--primary, #222);
  background: rgba(var(--primary-rgb), .04);
  padding: .8rem 1rem;
  margin-bottom: 1.2rem;
}
.need-note {
  display: block;
  font-size: 1rem;
  opacity: .6;
  margin-top: .2rem;
}

.rules-col ol {
  font-size: 1.3rem;
  line-height: 1.75;
  padding-left: 1.4rem;
  margin: 0;
}
.rules-col ol li {
  margin-bottom: .9rem;
  padding-left: .3rem;
}
.rules-col ol li::marker {
  font-family: Mono, monospace;
  font-size: 1rem;
}

.rules-note {
  font-size: 1.1rem;
  background: var(--primary, #222);
  color: var(--secondary, #fff);
  padding: .9rem 1rem;
  margin-top: 1.4rem;
}

/* Spanish translation sits right under its English line */
.es-inline {
  font-weight: 400;
  opacity: .55;
}
.es {
  font-size: .92em;
  opacity: .65;
  border-left: 3px solid rgba(var(--primary-rgb), .35);
  padding-left: .7rem;
  margin-top: .15rem;
}
.need-box .es {
  border-left: none;
  padding-left: 0;
  margin-top: .5rem;
}
.es-note {
  font-size: .92em;
  opacity: .75;
  margin-top: .3rem;
}

/* ============ bottom bar ============ */
.bottom-links {
  display: none;
  flex-direction: row;
  align-items: center;
  height: 3rem;
  position: fixed;
  left: .5rem; bottom: 0; right: .5rem;
}
@media screen and (min-width: 400px) { .bottom-links { display: flex; } }
@media screen and (min-width: 1000px) { .bottom-links { left: 2rem; right: 2rem; } }

.bottom-link {
  font-size: .8em;
  font-weight: 400;
  padding: .2rem;
  margin: 0 1rem 0 0;
  background-image: linear-gradient(90deg, var(--primary, #222), var(--primary, #222));
  background-position: bottom;
  background-size: 0 2px;
  background-repeat: no-repeat;
  transition: all .25s;
}
.bottom-link:hover { background-size: 2rem 2px; }

.bottom-right { margin-left: auto; display: flex; align-items: center; }
.bottom-button {
  font-family: Didactic, sans-serif;
  font-size: .8em;
  height: 3rem;
  padding: 0 .2rem;
  margin-left: .8rem;
  background: transparent;
  color: var(--primary, #222);
}
.bottom-button:hover { text-decoration: underline; }

/* half-moon invert toggle, same as the reference site */
.half-moon {
  border: 3px solid var(--primary, #222);
  position: relative;
  border-radius: 2000px;
  transform: translateZ(0);
}
.half-moon, .half-moon .half-moon-inner {
  height: 1.5rem; width: 1.5rem;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(circle, #fff 100%, #000 0);
}
.half-moon .half-moon-inner {
  background: var(--primary, #222);
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 2000px;
  transition: transform .5s cubic-bezier(.175, .885, .32, 1.275);
  opacity: .99;
  transform: translate(-50%, -50%) rotate(0deg);
}
.half-moon .half-moon-inner .half-moon-inner-inner {
  height: 1.5rem; width: 1rem;
  background: var(--secondary, #fff);
  position: absolute;
  top: 0; left: 50%;
  transform: translateZ(0);
  opacity: .99;
}
.half-moon.inverted .half-moon-inner {
  transform: translate(-50%, -50%) rotate(180deg);
}
