/*
 * RX Chess, child of Cassiopeia. Font: Manrope (SIL Open Font License, fonts/OFL-Manrope.txt),
 * served by the site (no request to other sites).
 */
@font-face {
  font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --cassiopeia-font-family-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cassiopeia-font-family-headings: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cassiopeia-font-weight-headings: 800;
  --cassiopeia-font-weight-normal: 400;
}

/*
 * RX Chess, child of Cassiopeia: light and dark following the system, or the scheme chosen with
 * the toggle (data-color-scheme on <html>, set by user.js). Colours with light-dark().
 */
:root { color-scheme: light dark; }
:root[data-color-scheme="light"] { color-scheme: light; }
:root[data-color-scheme="dark"] { color-scheme: dark; }

:root {
  --rx-surface: light-dark(#fff, #151b28);
  --rx-hover: light-dark(#e6edf9, #222b3f);
  --body-bg: light-dark(#fff, #0f1420);
  --body-color: light-dark(#22262a, #dfe5ee);
  --emphasis-color: light-dark(#000, #fff);
  --secondary-color: light-dark(#22262abf, #dfe5eebf);
  --secondary-bg: light-dark(#eaedf0, #1b2232);
  --tertiary-color: light-dark(#22262a80, #dfe5ee80);
  --tertiary-bg: light-dark(#f9fafb, #151b28);
  --border-color: light-dark(#dfe3e7, #2c3549);
  --border-color-translucent: light-dark(#0000002d, #ffffff26);
  --code-color: light-dark(#e93f8e, #ff8cc0);
  --highlight-color: light-dark(#22262a, #f5f0d0);
  --highlight-bg: light-dark(#fbeea8, #5c5220);
}
/* Links: the colour of the template in light, a lighter one in dark (contrast). */
:root { --link-color: light-dark(var(--cassiopeia-color-link), #9db8ff); --link-hover-color: light-dark(var(--cassiopeia-color-hover), #c3d3ff); }
/* Colours as r, g, b triplets (light-dark() does not apply to them). */
:root[data-color-scheme="dark"] {
  --body-color-rgb: 223, 229, 238; --body-bg-rgb: 15, 20, 32; --emphasis-color-rgb: 255, 255, 255;
  --secondary-bg-rgb: 27, 34, 50; --tertiary-bg-rgb: 21, 27, 40; --link-color-rgb: 157, 184, 255;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-color-scheme="light"]) {
    --body-color-rgb: 223, 229, 238; --body-bg-rgb: 15, 20, 32; --emphasis-color-rgb: 255, 255, 255;
    --secondary-bg-rgb: 27, 34, 50; --tertiary-bg-rgb: 21, 27, 40; --link-color-rgb: 157, 184, 255;
  }
}



/* Parts of Cassiopeia with fixed light colours. */
.metismenu.mod-menu .mm-collapse { background-color: var(--rx-surface); }
.container-header .metismenu.mod-menu .mm-collapse a { color: var(--body-color); }
.card { --card-bg: var(--rx-surface); }
.breadcrumb { background-color: light-dark(#00000008, #ffffff0d); }
.form-control, .form-select { background-color: var(--body-bg); color: var(--body-color); }

/* Theme toggle and login button in the main menu: right of the menu, aligned with its items. */
.container-header .container-nav { align-items: center; }
.container-nav > .mod-languages, .container-nav > .rx-login, .container-nav > .mod-custom:has(.rx-scheme) { margin-inline-start: auto; }
.container-nav > .mod-languages + .mod-custom:has(.rx-scheme), .container-nav > .mod-custom:has(.rx-scheme) + .rx-login { margin-inline-start: 0.5rem; }
/* Language switcher: EN / IT as text, the current one highlighted. */
.container-header .mod-languages__list { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.container-header .mod-languages .mod-languages__list > li { margin: 0; background: none; }
.container-header .mod-languages__list > li > a {
  display: inline-block; padding: 0.35em 0.6em; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 600; line-height: 1.4;
}
.container-header .mod-languages__list > li > a:hover, .container-header .mod-languages__list > li > a:focus-visible { background: rgb(255 255 255 / 0.15); }
.container-header .mod-languages__list > li.lang-active > a { background: rgb(255 255 255 / 0.22); }
.rx-login { position: relative; }
.rx-scheme__button, .rx-login__button {
  display: inline-block; padding: 0.35em 0.9em; border: 1px solid currentColor; border-radius: 999px;
  color: #fff; background: none; text-decoration: none; line-height: 1.4; cursor: pointer; white-space: nowrap; font: inherit;
}
.rx-scheme__button { padding-inline: 0.7em; }
.rx-scheme__button:hover, .rx-scheme__button:focus-visible, .rx-login__button:hover, .rx-login__button:focus-visible {
  background: rgb(255 255 255 / 0.15); color: #fff;
}
summary.rx-login__button { list-style: none; }
summary.rx-login__button::-webkit-details-marker { display: none; }
summary.rx-login__button::after { content: " ▾"; font-size: 0.8em; }
.rx-login__menu {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 1000; display: flex; flex-direction: column; gap: 0.25rem;
  min-width: 10rem; padding: 0.5rem; background: var(--rx-surface); color: var(--body-color); border-radius: 6px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.25);
}
.rx-login__menu > a, .rx-login__menu button {
  display: block; width: 100%; padding: 0.35rem 0.5rem; text-align: left; color: inherit; text-decoration: none;
  background: none; border: 0; border-radius: 4px; font: inherit; cursor: pointer;
}
.rx-login__menu > a:hover, .rx-login__menu button:hover { background: var(--rx-hover); }

/* Below 992px Cassiopeia stacks the menu: keep it in a row while it fits, wrapping when it does not. */
@media (width < 992px) {
  .container-header .container-nav > .metismenu.mod-menu { display: flex; flex: 0 1 auto; flex-flow: row wrap; }
  .container-header .metismenu.mod-menu .metismenu-item { padding: 0.4em 0.6em; font-size: 1rem; }
  .container-header .metismenu.mod-menu .metismenu-item > ul { left: 0; }
  .container-header .navbar-brand img { max-height: 4rem; width: auto; }
}
@media (width < 576px) {
  .container-header .container-nav > .metismenu.mod-menu { flex-basis: 100%; }
}


.container-header {
/*	background-image:url(/images/site/starry1280.jpg);
	background-size: cover;
*/
}

.com-wrapper iframe {
	width: 100%;
}

/* Design: clear and calm, a few chess touches. */
body { -webkit-font-smoothing: antialiased; line-height: 1.6; }
h1, h2, h3, .h1, .h2, .h3 { letter-spacing: -0.02em; line-height: 1.2; }
h2, .h2 { font-weight: 700; margin-top: 1.6em; }
a { text-underline-offset: 3px; }
/* The header: a chessboard barely there, fading in from the right. */
.container-header::after {
  content: ""; position: absolute; inset: 0 0 0 60%; pointer-events: none; z-index: 0;
  background: repeating-conic-gradient(rgb(255 255 255 / 0.035) 0 25%, transparent 0 50%) 0 0 / 176px 176px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000);
}
.container-header > * { position: relative; z-index: 1; }
.container-header .metismenu > li > a, .container-header .metismenu > li > button { font-weight: 600; }
/* Reading width of articles; tables as cards. */
.com-content-article__body { max-width: 74ch; }
.com-content-article__body table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 1rem 0 1.5rem;
  border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden;
}
.com-content-article__body th, .com-content-article__body td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.com-content-article__body tr:last-child > td { border-bottom: 0; }
.com-content-article__body th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--tertiary-bg); }
.com-content-article__body code { font-size: 0.9em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--secondary-bg); }
.com-content-article__body pre { padding: 0.9rem 1rem; border-radius: 10px; background: var(--secondary-bg); overflow-x: auto; }
.com-content-article__body pre code { padding: 0; background: none; }
.breadcrumb { border-radius: 10px; font-size: 0.9rem; }

