/**
 * Variables, reset, basic elements, icons
 * One of the stylesheets of the website, loaded in a fixed order by php/include/header.php
 * (list and order: AGENTS.md, "Stylesheets").
 */

:root {
  /* design colors */
  --color-yellow: #f4e631;
  --color-yellow-transparent-barely: rgb(244, 230, 49, 0.9);
  --color-yellow-transparent: rgb(244, 230, 49, 0.6);
  --color-yellow-transparent-light: rgb(244, 230, 49, 0.2);
  --color-yellow-toned: #beb400;
  --color-darkblue: #005193;
  --color-darkblue-transparent-barely: rgb(0, 81, 147, 0.9);
  --color-darkblue-transparent: rgb(0, 81, 147, 0.6);
  --color-darkblue-transparent-light: rgb(0, 81, 147, 0.2);
  --color-darkblue-toned: #3d71b7;
  --color-lightgray: #cdcdcd;
  --color-lightgray-transparent-barely: rgb(205, 205, 205, 0.9);
  --color-lightgray-transparent: rgb(205, 205, 205, 0.6);
  --color-lightgray-transparent-light: rgb(205, 205, 205, 0.2);

  /* base colors */
  --color-shadow: rgba(0, 0, 0, 0.25);
  --color-black: #000000;
  --color-gray: #808080;
  --color-gray-text: #767676; /* grey text on white with enough contrast (4.5:1) */
  --color-ultralightgray: #f0f0f0;
  --color-white: #ffffff;
  --color-disabled: #808080;
  --color-error: #990000;

  /* category colors */
  --color-category-yellow: var(--color-yellow);
  --color-category-yellow-text: var(--color-black);
  --color-category-darkblue: var(--color-darkblue);
  --color-category-darkblue-text: var(--color-white);
  --color-category-pink: #ff599e;
  --color-category-pink-text: var(--color-black);
  --color-category-cyan: #00e8ff;
  --color-category-cyan-text: var(--color-black);
  --color-category-green: #7dcd00;
  --color-category-green-text: var(--color-white);
  --color-category-orange: #ff8c00;
  --color-category-orange-text: var(--color-black);
  --color-category-purple: #a200ff;
  --color-category-purple-text: var(--color-white);
  --color-category-teal: #006c7d;
  --color-category-teal-text: var(--color-white);
  --color-category-brown: #b6ac75;
  --color-category-brown-text: var(--color-black);

  /* other styles */
  --shadow: 3px 3px 5px var(--color-shadow);
  --shadow-inset: inset 0 0 10em var(--color-shadow);
  --shadow-inset-light: inset 1px 1px 3px var(--color-shadow);

  --transition-fast: all 0.15s ease-in;
  --transition-fast-delay: all 0.15s 0.1s ease-in;
  --transition-default: all 0.3s ease-in;
  --transition-default-delay: all 0.3s 0.2s ease-in;
  --transition-slow: all 0.6s ease-in;
  --transition-slow-delay: all 0.6s 0.3s ease-in;

  --border-radius: 0.5rem;
  --border-radius-large: 1rem;
}

/**
 * @section Reset
 */
/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.2.2
*/
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
form,
fieldset,
input,
textarea,
p,
blockquote,
th,
td {
  margin: 0;
  padding: 0;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
fieldset,
img {
  border: 0;
}
address,
caption,
cite,
code,
dfn,
em,
strong,
th,
var {
  font-style: normal;
  font-weight: normal;
}
ol,
ul {
  list-style: none;
}
caption,
th {
  text-align: left;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: normal;
}
q:before,
q:after {
  content: "";
}
abbr,
acronym {
  border: 0;
}

/**
 * @section Basics
 */
.hidden {
  display: none;
}
/* smooth anchor scrolling with a short highlight of the target (was MooTools SmoothScroll) */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  :target {
    animation: target-highlight 1.5s ease-out;
  }
}
@keyframes target-highlight {
  from {
    background-color: #f4e631;
  }
}
/* elements like form set their own display, so make the attribute win */
[hidden] {
  display: none !important;
}

strong,
b {
  font-weight: bold;
}
em,
i {
  font-style: italic;
}
strong em,
em strong,
b em,
em b,
strong i,
i strong,
b i,
i b {
  font-style: italic;
  font-weight: bold;
}

a {
  text-decoration: none;
  color: var(--color-darkblue);
}
a:focus,
a:hover,
a:active {
  text-decoration: underline;
}
a:focus {
  outline: solid 1px var(--color-darkblue-transparent-light);
}
a.none {
  color: inherit;
}
a[href^="mailto:"],
a.email,
a.document {
  background-position: left center;
  background-repeat: no-repeat;
}
a[href^="mailto:"],
a.email {
  background-image: url(data:image/webp;base64,UklGRtAAAABXRUJQVlA4TMQAAAAvFcACEBq3sW2rSo2r/3K+QQcXd6uA6OLyZ17EkEQn4QgAQCDKtXNqss0vaGqyJntudM3War7BNfWCNtt1NNq2TY26De2MGI65/1bWsAFEzUILXDI1SBuEMnECzuRqBl9S0F0CMCoMPnzZR01J4r+DMkhE8K9Gp+yRFRT3UpAl/4HmrAcRov7IohFpqCoC3hb6Ki6W78mptXD5ooSW08ZaWI9AqxPjqyl8yfOPKmrQ7WSzj8LI+gQpmZL4DSy+sx/4e4MJ);
  padding-left: 25px;
}
a.document {
  background-image: url(data:image/webp;base64,UklGRpwAAABXRUJQVlA4TI8AAAAvC8ADEGegoJGk5vvTO8bw7wUbagMASWhQJxzb/59UQQAQiG7v/aUashXq/l2QuKMIIooAUngHAOD//4eHnP4lvc5eilGs0YKMWntYaOoAkPctwCayrVZvqBi6WMXH0YEaJKDlO44WIvqvsG0bpO0YDpEHFbYT9f5cN8Ky6j0Y9d77NyZ8uvLdzn+PAIzcFAA=);
  padding-left: 15px;
}

.note {
  background: transparent url(/img/error.png) left 15px no-repeat;
  padding: 1em 1em 0.5em 80px;
  min-height: 45px;
}
.note + .note {
  background: none;
  margin-top: -1.2em;
  min-height: 0;
}
.error {
  background: transparent url(/img/error.png) left 15px no-repeat;
  color: var(--color-error);
  font-family: Consolas, Courier New, monospace;
  min-height: 80px;
  overflow: visible;
  padding: 1em 1em 0.5em 80px;
}
.error + .error {
  margin-top: -1em;
}

br.clear {
  clear: both;
  line-height: 0;
  height: 0px;
}
div.spacer {
  clear: both;
  margin-bottom: 6em;
}
div.spacer.half {
  font-size: 50%;
}

/**
 * Micro Clearfix Hack
 * @see http://nicolasgallagher.com/micro-clearfix-hack/
 */
.cf:before,
.cf:after {
  content: " ";
  display: table;
}
.cf:after {
  clear: both;
}

form:before,
form:after {
  content: " ";
  display: table;
}
form:after {
  clear: both;
}

span.date {
  float: right;
}

a.disabled {
  color: var(--color-disabled);
}
img {
  max-width: 100%;
}
img.left {
  float: left;
  margin-right: 1.3em;
}
img.right {
  float: right;
  margin-left: 1.3em;
}
img.center {
  display: block;
  margin: 1em auto 1.3em auto;
}
img.shadow {
  box-shadow: var(--shadow);
}
/* Image with a caption (img.subtitled with a title, footer.php makes a figure of it): the caption
   below the image, as wide as it; on wide screens with a mouse it appears over the image while
   the pointer is on it */
figure.subtitled {
  display: table;
  margin: 1em auto 1.3em;
}
figure.subtitled > img {
  display: block;
  margin: 0;
}
figure.subtitled > figcaption {
  caption-side: bottom;
  color: var(--color-gray-text);
  display: table-caption;
  font-size: 0.9em;
  padding: 0.5em 0.2em 0;
  text-align: left;
}
@media (hover: hover) and (min-width: 991px) {
  figure.subtitled {
    position: relative;
  }
  figure.subtitled > figcaption {
    background-color: var(--color-lightgray-transparent-barely);
    border-radius: 5px;
    bottom: 50px;
    box-shadow: 0 0 5px var(--color-shadow);
    color: var(--color-darkblue);
    display: block;
    left: 40px;
    opacity: 0;
    padding: 0.6em 0.8em 0.8em;
    position: absolute;
    right: 40px;
    transition: opacity 0.5s, visibility 0.5s;
    visibility: hidden;
  }
  figure.subtitled:hover > figcaption,
  figure.subtitled:focus-within > figcaption {
    opacity: 1;
    visibility: visible;
  }
}
main.page ul,
main.page ol {
  margin-left: 1.3em;
}
main.page ul {
  list-style: disc;
}
ol {
  list-style: decimal;
}
main.page li {
  margin-bottom: 0.3em;
}
.legal {
  font-size: 0.9em;
}
/* Lucide icons (img/icons/<name>.svg): the SVG is used as a mask, so the icon takes the text
   colour (currentColor) and scales with the font size. Markup via icon() in PHP / Icon.icon() in JS:
   <span class="icon" style="--icon: url('/img/icons/eye.svg')" aria-hidden="true"></span>
   Only span.icon: older templates use class "icon" for other things (tags on the achievement
   cards, event attachments), which this rule must not resize. */
span.icon {
  display: inline-block;
  flex: none;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  background-color: currentColor;
  mask: var(--icon) center / contain no-repeat;
}
