/* Fonts */

@font-face {
  font-family: "BIZ UDPmincho";
  src: url("biz-udpmincho-v9-latin-regular.woff2") format("woff2");
  font-weight: 400;
}

@font-face {
  font-family: "BIZ UDPmincho";
  src: url("biz-udpmincho-v9-latin-700.woff2") format("woff2");
  font-weight: 700;
}

/* Variables */
:root {
  /* Neutral colors levels */
  --text-num: 0;
  --bg-num: 255;

  /* Basic colors */
  --text-color: rgb(var(--text-num), var(--text-num), var(--text-num));
  --background-color: rgb(var(--bg-num), var(--bg-num), var(--bg-num));

  /* Neutral colors variants
        The lower the coefficient at the end, the more distinct the color is from the background.
        The formulas are complex so as not to have problems related to transparency */
  --li-text-num: calc(var(--text-num) + (var(--bg-num) - var(--text-num)) * 0.3);
  --light-text-color: rgb(var(--li-text-num), var(--li-text-num), var(--li-text-num));
  --disabled-num: calc(var(--text-num) + (var(--bg-num) - var(--text-num)) * 0.55);
  --disabled-color: rgb(var(--disabled-num), var(--disabled-num), var(--disabled-num));
  --li-bg-num: calc(var(--text-num) + (var(--bg-num) - var(--text-num)) * 0.85);
  --light-background: rgb(var(--li-bg-num), var(--li-bg-num), var(--li-bg-num));
  --di-bg-num: calc(var(--text-num) + (var(--bg-num) - var(--text-num)) * 0.95);
  --dimmed-background: rgb(var(--di-bg-num), var(--di-bg-num), var(--di-bg-num));

  /* Main color and variants */
  /* --test: rgb(187, 91, 59); */
  --main: 187, 91, 59;
  --main-color: rgb(var(--main));
  --main-disabled-color: rgb(var(--main), 0.8);
  --main-light-background: rgb(var(--main), 0.3);
  --main-dimmed-background: rgb(var(--main), 0.08);

  /* Fonts */
  --serif-font: "BIZ UDPmincho", serif;

  /* Units */
  --px: 0.08rem;
  --table-font-size: calc(0.72rem + 0.18vw);
  --rem-vw: max(0.6rem + 0.8vw, 1rem);

  /* Borders */
  --border: var(--px) solid var(--main-color);
  --border-light: var(--px) solid var(--light-background);
  --border-main: var(--px) solid var(--main-disabled-color);
  --border-radius: 0.2rem;

  /* Measures */
  --min-margin: calc(0.45rem + 1.5vw);
}

/* Selection and focus */
::selection {
  color: var(--background-color);
  background: var(--main-disabled-color);
}

.btn {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a:focus-visible,
.btn:focus-visible {
  border-top: none;
  border-right: none;
  outline: var(--border-main) !important;
  background-color: var(--main-dimmed-background) !important;
}

/* General */

html {
  overflow-x: hidden !important;
  font-size: 17.5px;
  scroll-behavior: smooth;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-word;
}

body {
  margin: 0rem !important;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--serif-font);
}

.content {
  margin-inline: calc(6vw + var(--min-margin));
  height: fit-content;
  overflow: hidden;
}

/* Header */

.layout-default {
  position: sticky;
  z-index: 2;
  top: 0rem;
  background-color: var(--background-color);
  border-bottom: var(--border);
  width: 100%;
}

/* Navigation */

.navigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(0.7 * var(--min-margin)) calc(1 * var(--min-margin));
  margin: 0rem;
  padding: calc(0.7 * var(--min-margin));
}

.navigation ul li {
  display: block;
  margin: 0rem;
  padding: 0rem;
  font-size: 1rem;
}

/* Paragraphs and lists */

.content p,
.content li {
  line-height: 1.4;
  margin-block: 0.6rem;
}

.content p {
  margin-inline: 0rem;
}

.content ul,
.content ol {
  padding-left: 0;
}

.content li {
  margin-left: 2rem;
  position: relative;
  padding-left: 0.2rem;
}

.content ul>li {
  list-style-type: disc;
}

/* Strong and emphasis */

em {
  font-style: oblique;
}

/* Links */

a {
  color: var(--main-color);
  text-decoration: none;
  text-decoration-thickness: 0.07em !important;
  text-underline-offset: 0.17em;
}

a:hover {
  color: var(--main-color);
  text-decoration: underline;
}

.content a:after {
  content: " ✧";
}

/* Headings */

h1 {
  font-size: calc(2.3 * var(--rem-vw));
  margin: 2rem 0rem 3rem 0rem;
  font-weight: 400;
  text-align: center;
}

h2 {
  font-size: calc(1.7 * var(--rem-vw));
  font-family: var(--serif-font);
  margin: 4rem 0 2rem 0;
  font-weight: 400;
  padding-bottom: 0.3rem;
}

h3 {
  font-family: var(--serif-font);
  font-size: calc(1.4 * var(--rem-vw));
  margin: 4rem 0 1.2rem 0;
  font-weight: 500;
}

h4 {
  font-size: calc(1.3 * var(--rem-vw));
  margin: 5rem 0 1.2rem 0;
  font-weight: 400;
}

h5 {
  font-size: calc(1.2 * var(--rem-vw));
  margin: 1.3rem 0 1.2rem 0;
  font-weight: 400;
}

h6 {
  font-size: calc(1.1 * var(--rem-vw));
  margin: 1.1rem 0 0.7rem 0;
  font-weight: 500;
}

/* Tables */

table {
  table-layout: auto;
  margin: 1rem auto;
  border: var(--border) !important;
  border-collapse: collapse;
  border-style: hidden;
  font-size: var(--table-font-size);
}

table td,
table th {
  border: var(--border);
  padding: calc(0.3rem + 0.4vw);
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  hyphens: auto;
}

table th {
  font-weight: 500;
  background-color: var(--dimmed-background);
}

table tr:first-child th {
  border-top: 0;
}

table tr:last-child td {
  border-bottom: 0;
}

table tr td:first-child,
table tr th:first-child {
  border-left: 0;
}

table tr td:last-child,
table tr th:last-child {
  border-right: 0;
}

/* Code */

code,
pre {
  font-family: var(--serif-font);
  font-size: 86%;
}

code {
  padding: 0.15rem 0.4rem;
  margin: 0;
  background-color: var(--dimmed-background);
  color: var(--light-text-color);
}

pre {
  white-space: pre-wrap;
  padding: 1rem;
  background-color: var(--dimmed-background);
  color: var(--light-text-color);
  border-radius: calc(3 * var(--px));
}

pre>code {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  font-size: inherit;
}

/* Blockquotes */

blockquote::before {
  display: block;
  content: '“';
  font-style: normal;
  font-size: 5rem;
  color: rgb(var(--text-num), var(--text-num), var(--text-num), 0.15);
  height: 1.8rem;
  float: left;
  line-height: 1;
  margin-right: 0.6rem;
  margin-bottom: 0.6rem;
}

blockquote {
  margin: 0.8rem 0rem;
  font-style: oblique;
  color: var(--light-text-color);
}

blockquote>*:first-child {
  margin-top: 0rem;
}

blockquote em {
  font-style: normal;
}

blockquote li {
  list-style-position: inside;
}

/* Tables */

table {
  table-layout: auto;
  margin: 1rem auto;
  border: var(--border) !important;
  border-collapse: collapse;
  border-style: hidden;
  font-size: var(--table-font-size);
}

table td,
table th {
  border: var(--border);
  padding: calc(0.3rem + 0.4vw);
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  hyphens: auto;
}

table th {
  font-weight: 500;
  background-color: var(--dimmed-background);
}

table tr:first-child th {
  border-top: 0;
}

table tr:last-child td {
  border-bottom: 0;
}

table tr td:first-child,
table tr th:first-child {
  border-left: 0;
}

table tr td:last-child,
table tr th:last-child {
  border-right: 0;
}

/* Notices */

[class*='notice'] {
  margin: 1rem auto;
  padding: 0rem calc(0.6 * var(--rem-vw));
  background-color: var(--main-dimmed-background);
  border: calc(1 * var(--px)) solid var(--main-light-background);
  font-family: var(--serif-font);
}

/* Buttons */

.btn {
  display: inline-block;
  background-color: var(--background-color);
  font-size: 0.95em;
  font-family: var(--sans-font);
  text-decoration: none;
  cursor: pointer;
}

.btn {
  padding: 0.3rem 0.5em;
  border: var(--border-main);
  color: var(--main-color);
  white-space: nowrap
}

.btn:hover {
  background-color: var(--main-dimmed-background);
  text-decoration: none;
}

/* Form */

.content input[type="text"],
.content textarea {
  resize: none;
  border: var(--border-light);
  border-radius: 0rem;
  width: min(40rem, 100% - 2 * var(--min-margin));
  font-family: var(--serif-font);
  font-size: 0.9rem;
  padding: 0.3rem;
}

.content input[type="text"]:focus-visible,
.content textarea:focus-visible {
  border: var(--border-main);
  outline: none;
}

.content input[type="checkbox"]:focus-visible {
  outline: var(--border-main);
}

/* Images */

figure,
.figure {
  margin: 1.4rem 0rem;
  padding: 0rem;
  text-align: center;
}

img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  width: auto;
  margin-inline: auto;
  object-fit: cover;
}

figcaption,
.figure-caption {
  margin-top: 0.5rem;
  font-family: var(--serif-font);
  text-align: center;
  font-size: 0.9rem;
  color: var(--disabled-color);
}

.left {
  max-width: 50vw !important;
  float: left;
  margin: 0 var(--min-margin) 1rem 0;
}

.right {
  max-width: 50vw !important;
  float: right;
  margin: 0 0 1rem var(--min-margin);
}

.gallery {
  display: inline-block;
  vertical-align: top;
  margin: 0.5rem;
}

.gallery img,
.gallery {
  max-width: min(19rem, 100%) !important;
  width: min(19rem, 100%) !important;
}

/* Footer */

.siteinfo {
  width: calc(100% - 2rem);
  padding: var(--min-margin);
  margin: 7rem 0rem 5rem 0rem;
  position: relative;
  background-color: var(--background-color);
  z-index: 10;
  border-top: var(--border);
}


@media (max-width: 60rem),
only screen and (hover: none) and (pointer: coarse) {

  .left,
  .right {
    max-width: 100% !important;
    width: 100% !important;
    float: none;
    margin: auto;
  }

  .layout-default {
    position: relative;
  }

}