/*
 * sprue theme. Loaded after vendor/nes-core.min.css, which supplies the pixel
 * borders, buttons, and form controls. This file supplies the palette, the two
 * self-hosted fonts, the page layout, and the components NES.css lacks.
 *
 * Palette: sky blue, cream paper, dark ink, RAF roundel blue and red.
 */

@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/press-start-2p.woff2") format("woff2");
}

@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/pixelify-sans.woff2") format("woff2");
}

:root {
  --sky-top: #4f9fe0;
  --sky-bottom: #bfe1f5;
  --paper: #f7f1e1;
  --paper-deep: #ece3cb;
  --ink: #1e2a3a;
  --ink-soft: #5c6b7c;
  --blue: #1f3f8a;
  --blue-deep: #12264f;
  --red: #c8312b;
  --red-deep: #8a1f1a;
  --green: #4a8a3a;
  --green-deep: #2f5c25;
  --amber: #d9a520;
  --purple: #6b3fa0;
  --shadow: rgba(30, 42, 58, 0.35);
  --display: "Press Start 2P", "Courier New", monospace;
  --body: "Pixelify Sans", "Trebuchet MS", sans-serif;
  --width: 1040px;
}

/* Pixel cursors from NES.css, served as files. The arrow everywhere, the
   hand on anything clickable, the text cursor where you type. */
html {
  cursor: url("cursor-arrow.png"), auto;
}

a,
button,
summary,
.nes-btn,
.nes-select select,
.nes-radio + span,
.nes-checkbox + span,
label.choice,
input[type="file"] {
  cursor: url("cursor-hand.png") 14 0, pointer;
}

input[type="text"],
input[type="email"],
input[type="date"],
textarea {
  cursor: text;
}

html,
body {
  font-family: var(--body);
}

body {
  min-height: 100vh;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(var(--sky-top), var(--sky-bottom) 60vh, var(--sky-bottom));
  -webkit-font-smoothing: auto;
}

/* Photos are not pixelated. Only the badges and the mark are. */
img {
  image-rendering: auto;
}

img.badge,
img.mark,
img.flair {
  image-rendering: pixelated;
}

/* Member pictures: the photo sits left of the name, the flair small on its
   right, everywhere a name appears. */
img.flair {
  vertical-align: middle;
  margin-left: 0.35rem;
}

.flair-picker img.flair {
  margin: 0;
}

img.avatar.tiny {
  margin-right: 0.35rem;
  border-width: 2px;
}

.byline {
  display: flex;
  align-items: center;
}

.who {
  display: inline-flex;
  align-items: center;
}

img.avatar {
  vertical-align: middle;
  margin-right: 0.6rem;
  border: 4px solid var(--ink);
  object-fit: cover;
}

.flair-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
}

.flair-picker label {
  display: inline-flex;
  padding: 0.5rem;
  background: var(--paper-deep);
  border: 4px solid transparent;
}

.flair-picker input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.flair-picker input:checked + img {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

.flair-picker img {
  margin: 0;
}

.nes-field > .label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

form.avatar-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 4px dotted var(--paper-deep);
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-deep);
}

/* Display type: headings, nav, buttons, tags. Sizes are small because the
   font is wide. */
h1,
h2,
h3,
nav,
.brand,
.nes-btn,
.tag,
.nes-container.with-title > .title {
  font-family: var(--display);
  line-height: 1.6;
}

h1 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
}

/* The sign-in form's trap field: bots fill it, people never see it. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Page icons: pixel art drawn on a 12 by 12 grid, one per section so the
   pages read differently at a glance. */
h1 img.icon {
  width: 24px;
  height: 24px;
  margin-right: 0.6rem;
  vertical-align: -3px;
}

h1 img.badge {
  width: 28px;
  height: 28px;
  margin-left: 0.4rem;
}

h2 {
  font-size: 0.8rem;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1rem;
}

/* Header: brand, then the two site sections, then the account cluster
   pushed to the right. Wraps to rows on narrow screens. */

header.site {
  max-width: var(--width);
  margin: 0 auto;
  padding: 1rem 1rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem 1.6rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
}

.brand a {
  color: var(--ink);
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--paper);
}

.brand .mark-link {
  display: inline-flex;
  line-height: 0;
}

.brand .mark-link:hover .mark {
  transform: translateY(-2px);
}

header.site nav {
  display: flex;
  align-items: center;
  gap: 0.8rem 1.2rem;
  flex-wrap: wrap;
  font-size: 0.65rem;
}

header.site nav.account {
  margin-left: auto;
}

header.site nav a:not(.nes-btn),
header.site nav button.linkish {
  padding-bottom: 2px;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--paper);
  border-bottom: 3px solid transparent;
}

header.site nav a:not(.nes-btn):hover,
header.site nav button.linkish:hover {
  border-bottom-color: var(--blue);
}

header.site nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

header.site nav form {
  display: inline;
}

/* Account menu: a details element, so it opens without any script. */
.menu {
  position: relative;
}

.menu summary {
  list-style: none;
  padding-bottom: 2px;
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--paper);
  border-bottom: 3px solid transparent;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary::after {
  content: "";
  display: inline-block;
  margin-left: 0.5rem;
  border: 5px solid transparent;
  border-top-color: var(--ink);
  border-bottom: 0;
  vertical-align: 2px;
  transform: rotate(90deg);
  transition: transform 0.2s steps(3, end);
}

.menu[open] summary {
  border-bottom-color: var(--ink);
}

.menu[open] summary::after {
  transform: rotate(0);
}

.menu-list {
  animation: rise 0.2s steps(3, end);
  position: absolute;
  right: 0;
  top: calc(100% + 0.8rem);
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 14rem;
  padding: 0.6rem 0;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
}

header.site .menu-list a,
header.site .menu-list a[aria-current="page"],
header.site .menu-list button.linkish {
  display: block;
  width: 100%;
  padding: 0.7rem 1.4rem;
  text-align: left;
  text-shadow: none;
  border: 0;
  border-left: 4px solid transparent;
}

header.site .menu-list a:hover,
header.site .menu-list button.linkish:hover {
  background: var(--paper-deep);
}

header.site .menu-list a[aria-current="page"] {
  border-left-color: var(--ink);
}

header.site .menu-list form {
  display: block;
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 4px dotted var(--paper-deep);
}

/* Motion: a few stepped frames, the way a pixel game moves. Anything that
   appears rises into place; anything you press or hover shifts a pixel or
   two. All of it is off for people who asked their system for less motion. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

main.panel,
.toast,
.previews img {
  animation: rise 0.3s steps(4, end);
}

li.card,
.brand .mark,
.nes-btn {
  transition: transform 0.15s steps(2, end), box-shadow 0.15s steps(2, end);
}

li.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow);
}

.nes-btn:active {
  transform: translate(2px, 2px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* The paper panel every page sits on */

main.panel {
  max-width: var(--width);
  margin: 0.6rem auto 2rem;
  padding: 1.5rem 1.5rem 2rem;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
}

@media (max-width: 720px) {
  main.panel {
    margin: 0.6rem 0.5rem 2rem;
    padding: 1rem;
  }
}

footer.site {
  max-width: var(--width);
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  font-size: 1rem;
  color: var(--ink);
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: 0.6rem;
}

footer.site nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

footer.site nav a:hover {
  border-bottom-color: var(--ink);
}

footer.site p {
  margin: 0;
}

/* The body font draws the copyright sign tiny; the display font draws it
   at the size of a capital. */
footer.site .copyright {
  font-family: var(--display);
  font-size: 0.75rem;
  vertical-align: -1px;
}

/* Sections: NES containers with the title sitting in the border line. */
section.nes-container {
  margin: 2rem 0 0;
  padding: 1.5rem 1.25rem 1.25rem;
  border-color: var(--ink);
}

section.nes-container.with-title > .title {
  font-size: 0.7rem;
  margin: -2.1rem 0 1rem;
  padding: 0 0.5rem;
  background: var(--paper);
  color: var(--ink);
}

section.nes-container > :last-child {
  margin-bottom: 0;
}

/* Text helpers */

.meta {
  color: var(--ink-soft);
  font-size: 1rem;
}

.lede {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.quiet {
  color: var(--ink-soft);
}

.back {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.back a {
  text-decoration: none;
}

/* Toasts: one message after an action, top right, gone after a few seconds
   or a click. Green with a tick for success, red with a cross for errors. */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: min(90vw, 26rem);
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--green);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: url("cursor-hand.png") 14 0, pointer;
}

.toast.error {
  background: var(--red);
}

.toast img {
  flex: none;
  image-rendering: pixelated;
}

.toast.gone {
  animation: sink 0.3s steps(4, end) forwards;
}

@keyframes sink {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* Inline notice that stays on the page, unlike a toast. */
.notice {
  padding: 0.6rem 1rem;
  margin: 0 0 1.2rem;
  border: 4px solid var(--red);
  background: #f6d9d5;
}

.prompt {
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  border-left: 6px solid var(--blue);
  background: var(--paper-deep);
}

/* Status tag on competitions, coloured by state. */
.tag {
  display: inline-block;
  text-transform: capitalize;
  padding: 0.25rem 0.5rem 0.15rem;
  font-size: 0.55rem;
  color: #fff;
  background: var(--ink);
  vertical-align: middle;
}

.tag.open {
  background: var(--green);
}

.tag.voting {
  background: var(--amber);
  color: var(--ink);
}

.tag.decided {
  background: var(--blue);
}

.tag.unbuilt {
  background: var(--ink-soft);
}

.tag.building {
  background: var(--amber);
  color: var(--ink);
}

.tag.built {
  background: var(--green);
}

.tag.next {
  background: var(--red);
}

.tag.private {
  background: var(--ink-soft);
}

.tag.official {
  background: var(--purple);
}

.tag.category {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding-top: 0.15rem;
  padding-bottom: 0.05rem;
}

/* Category filter row on the competitions page. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.filters a {
  padding: 0.35rem 0.7rem;
  font-family: var(--display);
  font-size: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper-deep);
  border: 3px solid transparent;
}

.filters a:hover {
  border-color: var(--ink-soft);
}

.filters a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

/* Legend for the competition tags, top right, open on hover or click. */
.legend {
  position: relative;
}

.legend summary {
  list-style: none;
  font-family: var(--display);
  font-size: 0.6rem;
  color: var(--ink-soft);
  border-bottom: 3px dotted var(--ink-soft);
}

.legend summary::-webkit-details-marker {
  display: none;
}

.legend-list {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  z-index: 10;
  width: 22rem;
  max-width: 90vw;
  margin: 0;
  padding: 0.6rem 0.9rem;
  list-style: none;
  font-size: 1rem;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  animation: rise 0.2s steps(3, end);
}

.legend[open] .legend-list,
.legend:hover .legend-list {
  display: block;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
}

.legend-list .tag {
  flex: none;
  min-width: 4.2rem;
  text-align: center;
}

.page-head .actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Bench head: picture left, name with a small flair, details under it. */
.bench-head .avatar {
  margin: 0;
}

.bench-head .who {
  flex: 1 1 auto;
}

.bench-head h1 {
  margin-bottom: 0.2rem;
}

.bench-head h1 .flair {
  margin: 0 0 0 0.6rem;
  vertical-align: -2px;
}

.bench-head .meta {
  margin: 0;
}

.brief {
  padding: 0.6rem 1rem;
  border-left: 6px solid var(--red);
  background: var(--paper-deep);
}

.flair-picker .locked {
  display: inline-flex;
  padding: 0.5rem;
  border: 4px dotted var(--ink-soft);
}

.flair-picker .locked img {
  opacity: 0.45;
}

/* Tooltips: any element with a data-tip shows it above itself on hover, on
   keyboard focus, or after a tap, which toggles it. */
[data-tip] {
  position: relative;
}

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: none;
  width: max-content;
  max-width: 16rem;
  padding: 0.4rem 0.7rem;
  font-family: var(--body);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--paper);
  background: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  white-space: normal;
  text-align: center;
  animation: rise 0.2s steps(3, end);
}

[data-tip]:hover::after,
[data-tip]:focus-visible::after,
[data-tip].show::after {
  display: block;
}

/* Cards */

ul.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

li.card {
  position: relative;
  border: 4px solid var(--ink);
  background: var(--paper-deep);
  box-shadow: 4px 4px 0 var(--shadow);
}

li.card > a {
  display: block;
  padding: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

li.card > a:hover {
  background: var(--paper);
}

li.card .cover {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin: 0 0 0.5rem;
  border: 4px solid var(--ink);
  background: var(--sky-bottom);
}

li.card strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

li.card em {
  display: block;
  font-style: normal;
  color: var(--ink-soft);
}

li.card .meta {
  display: block;
  font-size: 0.95rem;
}

li.card .votebox {
  display: block;
  padding: 0.6rem 0.6rem 0;
  font-size: 1rem;
}

li.card img.badge {
  display: inline;
  width: 20px;
  height: 20px;
  margin: 0 0 -3px 0.3rem;
  border: 0;
  vertical-align: baseline;
}

ul.cards.featured {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

ul.cards.featured li.card .cover {
  height: 220px;
}

/* Owner-only edit link in a card's footer, outside the main link. */
li.card .cardlink {
  display: block;
  padding: 0 0.6rem 0.5rem;
  font-family: var(--display);
  font-size: 0.55rem;
  text-decoration: none;
}

/* Page head: title on the left, one action button on the right. */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.page-head h1,
.page-head .nes-btn {
  margin: 0;
}

.page-head .actions {
  margin: 0;
}

.menu summary .tag,
.menu-list .tag {
  margin-left: 0.3rem;
  font-size: 0.5rem;
  vertical-align: 1px;
}

/* Vote row on a build page. */
.votes {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}

.votes .count {
  font-family: var(--display);
  font-size: 0.65rem;
}

.votes form {
  display: inline;
}

.votes .nes-btn {
  margin: 0;
}

/* Quick post form on the community page: fields in a row on wide screens. */
form.post .post-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 1rem;
}

form.post .meta {
  display: inline-block;
  margin-left: 0.5rem;
}

/* Short forms whose fields sit in a row: stash add, goal. */
form.inline-fields {
  display: flex;
  align-items: flex-end;
  gap: 0 1rem;
  flex-wrap: wrap;
}

form.inline-fields .nes-field {
  flex: 1 1 160px;
  margin-bottom: 0.6rem;
}

form.inline-fields .nes-btn {
  margin-bottom: 0.6rem;
}

/* Stash */
.debt {
  font-size: 1.25rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}

.actions form {
  display: inline;
}

ul.journal {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

ul.journal li {
  padding: 0.6rem 0;
  border-top: 4px dotted var(--paper-deep);
}

ul.journal p {
  margin: 0.2rem 0 0;
  white-space: pre-line;
}

form.remove {
  margin-top: 1.5rem;
}

/* Report a build: folded away until wanted. */
details.report {
  margin-top: 2rem;
  font-size: 1rem;
}

details.report summary {
  color: var(--ink-soft);
  text-decoration: underline;
}

details.report form {
  margin-top: 0.8rem;
}

/* Build page photos */

.gallery {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--ink);
  background: var(--paper-deep);
}

ul.thumbs {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0;
}

ul.thumbs img {
  display: block;
  width: 140px;
  height: 100px;
  object-fit: cover;
  border: 4px solid var(--ink);
}

.previews {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.6rem 0 0;
}

.previews img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border: 4px solid var(--ink);
}

ul.thumbs .thumb-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

ul.thumbs .thumb-actions form {
  display: inline;
}

ul.thumbs .thumb-actions button.linkish {
  color: var(--blue);
  text-decoration: underline;
}

button.linkish.danger {
  color: var(--red);
}

.pager {
  margin: 1.5rem 0 0;
  text-align: center;
}

section.nes-container.danger {
  border-color: var(--red);
}

section.nes-container.danger.with-title > .title {
  color: var(--red);
}

/* Plain lists: competitions, admin rows, supporters */

ul.rows,
ol.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.rows li,
ol.rows li {
  display: flex;
  align-items: center;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  padding: 0.8rem 0;
  border-bottom: 4px dotted var(--paper-deep);
}

ul.rows li:last-child,
ol.rows li:last-child {
  border-bottom: 0;
}

/* Supporters are numbered by hand in the display font so the order reads
   as a standing, top gift first. */
ol.donors {
  counter-reset: donor;
}

ol.donors li::before {
  counter-increment: donor;
  content: counter(donor);
  font-family: var(--display);
  font-size: 0.7rem;
  min-width: 1.6rem;
  color: var(--roundel-blue);
}

ol.donors strong {
  font-size: 1.2rem;
}

ul.rows a {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

ul.rows .meta {
  flex: 1 1 auto;
}

ul.rows form {
  display: inline;
}

ul.rows .nes-btn {
  margin: 0;
}

/* Podium: three winning builds, first raised in the middle. */
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.podium li {
  padding: 0.6rem;
  text-align: center;
  background: var(--paper-deep);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
}

.podium .place-1 {
  order: 2;
  padding-bottom: 2rem;
}

.podium .place-2 {
  order: 1;
}

.podium .place-3 {
  order: 3;
}

.podium a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.podium .cover {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 4px solid var(--ink);
}

.podium .place-1 .cover {
  height: 170px;
}

.podium .badge {
  display: block;
  margin: 0 auto 0.3rem;
}

.podium strong {
  display: block;
  font-size: 1.1rem;
}

.podium .byline {
  justify-content: center;
  margin-top: 0.2rem;
}

@media (max-width: 600px) {
  .podium {
    grid-template-columns: 1fr;
  }

  .podium .place-1,
  .podium .place-2,
  .podium .place-3 {
    order: 0;
    padding-bottom: 0.6rem;
  }
}

.filters .past {
  margin-left: auto;
  background: var(--paper);
  border-color: var(--ink);
}

section.nes-container.with-title > .title a {
  color: var(--ink);
  text-decoration: none;
}

/* Trophy case */

ul.trophies {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.trophies li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

ul.trophies img.badge {
  width: 40px;
  height: 40px;
}

/* Forms */

form {
  max-width: 560px;
}

form.wide {
  max-width: none;
}

.nes-field {
  margin: 0 0 1.1rem;
}

.nes-field > label {
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.nes-input,
.nes-textarea,
.nes-select select {
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fffdf7;
}

.nes-select select {
  background-position: right 0.75rem center;
}

.nes-select::after {
  border-color: var(--ink) transparent transparent;
}

label.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Buttons: NES.css shapes, sprue colours. Default is cream, primary is
   roundel blue. */
.nes-btn {
  padding: 0.55rem 0.9rem 0.45rem;
  margin: 4px 4px 4px 0;
  font-size: 0.6rem;
  color: var(--ink);
  background: var(--paper-deep);
  text-decoration: none;
}

.nes-btn:hover {
  color: var(--ink);
  background: var(--paper);
}

.nes-btn::after {
  box-shadow: inset -4px -4px var(--shadow);
}

.nes-btn:hover::after {
  box-shadow: inset -6px -6px var(--shadow);
}

.nes-btn.is-primary {
  color: #fff;
  background: var(--blue);
}

.nes-btn.is-primary:hover {
  color: #fff;
  background: #27509f;
}

.nes-btn.is-primary::after {
  box-shadow: inset -4px -4px var(--blue-deep);
}

.nes-btn.is-primary:hover::after {
  box-shadow: inset -6px -6px var(--blue-deep);
}

.nes-btn.is-primary:focus {
  box-shadow: 0 0 0 6px rgba(31, 63, 138, 0.3);
}

.nes-btn.is-success {
  color: #fff;
  background: var(--green);
}

.nes-btn.is-success:hover {
  color: #fff;
  background: #559a43;
}

.nes-btn.is-success::after {
  box-shadow: inset -4px -4px var(--green-deep);
}

.nes-btn.is-success:hover::after {
  box-shadow: inset -6px -6px var(--green-deep);
}

.nes-btn.is-success:focus {
  box-shadow: 0 0 0 6px rgba(74, 138, 58, 0.3);
}

.nes-btn.is-error {
  color: #fff;
  background: var(--red);
}

.nes-btn.is-error::after {
  box-shadow: inset -4px -4px var(--red-deep);
}

header.site .nes-btn {
  margin: 0;
}

button.linkish {
  font: inherit;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}
