body {
	max-width: 1220px;
	margin: auto;
	font-family: Literata;
}

.navigation {
	border: 2px solid white;
	border-radius: 8px;
	padding: 8px 8px 8px 8px;
	margin: 4px 0px 0px 0px;
	align-items: baseline;
	flex-wrap: wrap;
	display: flex;
	justify-content: space-between;
}

.navigation > div {
	font-weight: bold;
}

.where-we-are {
	border: 2px solid white;
	border-radius: 8px;
	padding: 8px;
	align-items: center;
	margin: 4px 0px;
}

span {
	white-space: nowrap;
}

.page-date {
	font-size: x-large;
	font-weight: bold;
	padding: 0px;
	text-align: center;
}

.prev-next-link {
	border-radius: 4px;
	padding: 4px 8px 8px 8px;
	text-decoration: none;
	font-weight: bold;
	font-size: large;
}

/* A form button looking like the navigation ones. */
input.prev-next-link, button.prev-next-link {
	background: none;
	font-family: inherit;
	cursor: pointer;
}

.end-of-the-road {
	border: 2px solid brown;
	border-radius: 4px;
	padding: 4px 8px 8px 8px;
	font-weight: bold;
	font-size: large;
	color: brown;
}

.people_location {
	display: flex;
	flex-wrap: wrap;
}

.author {
	color: gray;
	text-align: right;
	margin-top: 10px;
}

.author_tag {
	background-color: gray;
	color: white;
	border: 1px solid White;
	border-radius: 4px;
	font-size: smaller;
	padding: 2px 4px;
	margin: 0px;
}

.tag_error {
	background-color: red;
}

.people_tag {
	background-color: steelblue;
	color: white;
	border: 1px solid White;
	border-radius: 4px;
	font-size: smaller;
	padding: 2px 4px;
	margin: 4px 8px 4px 0px;
}

.place_tag {
	background-color: darkolivegreen;
	color: white;
	border: 1px solid white;
	border-radius: 4px;
	font-size: smaller;
	padding: 2px 4px;
	margin: 4px 8px 4px 0px;
}

.chapter {
	border: 2px solid white;
	border-radius: 8px;
	padding: 0px 8px 16px 8px;
	margin: 4px 0px;
}

.image-full-width {
	max-width: 100%;
}

.image-half-width {
	max-width: 50%;
}

.image-80-width {
	max-width: 80%;
}

.image-75-width {
	max-width: 75%;
}

.image-60-width {
	max-width: 60%;
}

.image-40-width {
	max-width: 40%;
}

.boxed-note {
	border: 2px solid gray;
	border-radius: 8px;
	padding: 8px;
	margin: 0px;
}

.table-in-text {
	border: 0px;
	float: left;
	background-color: darkgray;
	margin: 0px 8px 4px 0px;
}

.td-in-text {
	padding:8px;
}

div.loc-nav {
	font-size: larger;
	font-weight: bold;
	padding: 0px;
}

.hash_tag {
	background-color: slategray;
	color: white;
	border: 1px solid white;
	border-radius: 4px;
	font-size: smaller;
	padding: 2px 4px;
	margin: 4px 8px 4px 0px;
}

/* The tags of a chapter; while they are edited, the row is shown in the middle of the window. */
.chapter-tags {
	align-items: center;
	scroll-margin-top: 40vh;
}

.tag-edit {
	color: darkgray;
	font-size: smaller;
	padding: 2px 4px;
}

.hash_tag > form {
	display: inline;
}

.tag-remove {
	color: inherit;
	font: inherit;
	background: none;
	border: none;
	padding: 0px 0px 0px 6px;
	cursor: pointer;
}

.tag-form {
	font-size: smaller;
	margin: 4px 0px;
}

.tag-form > input[type=text] {
	font: inherit;
}

.tag-form > a {
	font-size: 12px;
	font-weight: bold;
}

div.b {font-weight: bold;}

img {display: block;}

a.link-self	{
	color: brown;
	font-weight: bold;
	text-decoration: none;
	font-size: larger;
	border: 2px solid brown;
	border-radius: 5px;
	padding-left: 10px;
	padding-right: 10px;
	padding-top: 0px;
	padding-bottom: 5px;
}

.highlight {
	color: brown;
	font-weight: bold;
	text-decoration: none;
}

.img-inline {
	margin: 0px;
	align-items: center;
	flex-wrap: wrap;
	display: flex;
}

.img-inline > div {
	padding: 0px 8px 16px 0px;
}
.page-count {
	color: gray;
	font-size: 80%;
}

.years {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 6px;
	margin: 6px 0px;
	font-variant-numeric: tabular-nums;
}

.years .prev-next-link {
	display: block;
	position: relative;
	text-align: center;
	white-space: nowrap;
}

.years .decade {
	font-style: italic;
}

/* The birth years stand out: bright confetti on gold, a red border and a glow; the dots keep away from the year and the count. */
.years .prev-next-link.birth-year {
	color: black;
	border-color: #e63946;
	box-shadow: 0px 0px 6px 1px rgba(230, 57, 70, 0.55);
	background-color: #ffd23f;
	background-image:
		radial-gradient(circle at 6% 28%, #e63946 2.5px, transparent 3px),
		radial-gradient(circle at 13% 72%, #1d4ed8 2.5px, transparent 3px),
		radial-gradient(circle at 21% 20%, #15803d 2.5px, transparent 3px),
		radial-gradient(circle at 27% 62%, white 2px, transparent 2.5px),
		radial-gradient(circle at 32% 88%, #7e22ce 2px, transparent 2.5px),
		radial-gradient(circle at 71% 14%, #7e22ce 2.5px, transparent 3px),
		radial-gradient(circle at 78% 44%, #e63946 2px, transparent 2.5px),
		radial-gradient(circle at 86% 18%, white 2.5px, transparent 3px),
		radial-gradient(circle at 94% 40%, #15803d 2px, transparent 2.5px);
}

.years .birth-year .page-count {
	color: #5c4500;
}

.years .page-count {
	position: absolute;
	right: 4px;
	bottom: 2px;
	font-size: 70%;
	font-style: normal;
	font-weight: normal;
	line-height: 1;
}

.years > .last-column {
	grid-column: 10;
}

/* The gap between the decades and 1950: whose birth year is pointed at, with balloons. */
.years > .birth-text {
	grid-column: 7 / 10;
	align-self: center;
	position: relative;
	top: -5px;
	text-align: center;
	font-size: 120%;
	font-weight: bold;
	white-space: nowrap;
	color: #e63946;
}

.years > .birth-text:not(:empty) {
	animation: birth-text-pop 0.45s ease-out, birth-text-colors 2s linear infinite;
}

.years > .birth-text:not(:empty)::before, .years > .birth-text:not(:empty)::after {
	display: inline-block;
	margin: 0px 10px;
	animation: birth-text-balloons 1.2s ease-in-out infinite;
}

.years > .birth-text:not(:empty)::before {
	content: "🎈🎉";
}

.years > .birth-text:not(:empty)::after {
	content: "🎂🎈";
	animation-delay: -0.6s;
}

@keyframes birth-text-pop {
	0% { transform: scale(0.3) rotate(-6deg); opacity: 0; }
	60% { transform: scale(1.2) rotate(3deg); opacity: 1; }
	100% { transform: scale(1) rotate(0deg); }
}

@keyframes birth-text-colors {
	0%, 100% { color: #e63946; }
	25% { color: #7e22ce; }
	50% { color: #1d4ed8; }
	75% { color: #15803d; }
}

@keyframes birth-text-balloons {
	0%, 100% { transform: translateY(2px) rotate(-6deg); }
	50% { transform: translateY(-6px) rotate(6deg); }
}

.logo {
	width: 256px;
	height: 64px;
	vertical-align: middle;
}

.home-header {
	display: flex;
	align-items: center;
	border-bottom: 1px solid gray;
	margin: 12px 0px 0px 0px;
	padding-bottom: 12px;
}

/* The header and the row of links are split into three equal parts, so that the title and the search are in the middle. */
.home-header > *, .home-links > * {
	flex: 1;
}

.home-title {
	text-align: center;
}

.home-title > h1 {
	margin: 0px;
	white-space: nowrap;
}

.home-stats {
	color: gray;
	font-size: smaller;
}

.home-links {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 16px;
	border-bottom: 1px solid gray;
	margin: 1em 0px;
	padding-bottom: 1em;
}

.home-links .prev-next-link, .years .prev-next-link, .aux-page .prev-next-link {
	color: brown;
	border: 2px solid brown;
	padding: 2px 6px 5px 6px;
	font-size: medium;
}

.years .prev-next-link {
	color: black;
	border-color: silver;
}

/* The periods of the family's life; the birth years keep their festive look. */

/* Black and white, like an old film. */
.years .era-prehistoric:not(.birth-year), .era-legend .era-prehistoric {
	color: black;
	background-color: #dddddd;
}

/* A forest and a watermelon field. */
.years .era-prefamily:not(.birth-year), .era-legend .era-prefamily {
	color: black;
	background-color: #c9e5bb;
}

/* Heat and desert: sand under a scorching sun. */
.years .era-kazakhstan:not(.birth-year), .era-legend .era-kazakhstan {
	color: black;
	background-color: #efdba5;
}

/* The Soviet Union and the Red Square. */
.years .era-moscow:not(.birth-year), .era-legend .era-moscow {
	color: black;
	background-color: #f8d4d4;
}

/* The flags of Canada and the USA: red, white and blue. */
.years .era-america:not(.birth-year), .era-legend .era-america {
	color: black;
	background-color: #ccdef6;
}

.era-legend {
	display: flex;
	flex-wrap: wrap;
	border-top: 1px solid gray;
	margin: 1em 0px 0px 0px;
	padding-top: 1em;
	font-size: 12px;
}

.era-legend > span {
	flex: 1;
	text-align: center;
	padding: 1px 6px 2px 6px;
}

.home-links > span:last-child {
	text-align: right;
}

/* The count of the new items: small, in the bottom right corner of the button, like the counts in the calendar. */
.home-links .new-count {
	position: relative;
	top: 6px;
	left: 2px;
	margin-left: 4px;
	font-size: 70%;
	font-weight: normal;
	font-variant-numeric: tabular-nums;
}

.home-links .has-new {
	animation: has-new 2.5s ease-in-out infinite;
}

@keyframes has-new {
	0%, 100% {
		background-color: transparent;
		box-shadow: 0px 0px 0px 0px rgba(255, 0, 0, 0);
	}
	50% {
		background-color: rgba(255, 0, 0, 0.15);
		box-shadow: 0px 0px 8px 2px rgba(255, 0, 0, 0.6);
	}
}

.home-search {
	margin: 0px;
	text-align: center;
	white-space: nowrap;
}

.home-search > input {
	color: brown;
	background: none;
	border: 2px solid brown;
	border-radius: 4px;
	padding: 2px 6px 5px 6px;
	font-family: inherit;
	font-size: medium;
}

.home-search > input[type=submit] {
	font-weight: bold;
	cursor: pointer;
}

.home-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 16px;
	border-top: 1px solid gray;
	padding-top: 1em;
	margin-bottom: 0px;
	font-size: small;
}

.home-footer > a {
	color: gray;
}

.aux-page h1 .prev-next-link {
	position: relative;
	top: -4px;
	vertical-align: middle;
	margin-right: 8px;
}

.year-nav {
	display: flex;
	align-items: center;
}

.year-nav > div {
	flex: 1;
	white-space: nowrap;
}

.year-nav > div:last-child {
	text-align: right;
}

.year-nav > h1 {
	text-align: center;
}

.aux-page {
	font-variant-numeric: tabular-nums;  /* digits of the same width, so that the dates line up */
}

.flag-slot {
	display: inline-block;
	width: 24px;
}

.user-box {
	text-align: right;
	white-space: nowrap;
}

.user-box > a {
	color: gray;
}

.comments {
	clear: both;
}

.comment {
	margin: 0px 0px 16px 0px;
}

.comment-header {
	color: gray;
	font-size: smaller;
}

/* The author of a comment: the icon and the name on the user's color. */
.user_tag {
	color: white;
	border-radius: 4px;
	padding: 2px 6px;
	white-space: nowrap;
}

.user_tag > span {
	margin-right: 0.45em;
}

.comment-header > form {
	display: inline;
}

.comment-action {
	color: darkgray;
	font: inherit;
	text-decoration: underline;
	background: none;
	border: none;
	padding: 0px;
	cursor: pointer;
}

/* The form of a new comment above the list (on /ideas): "Добавить" on the left, the order of the comments
   at the right edge, the open form under them. */
.comment-new-top {
	display: flex;
	flex-wrap: wrap;
	margin: 0px 0px 16px 0px;
}

#comment-sort {
	order: 1;
	margin-left: auto;
}

.comment-new-top > #comment-form {
	order: 2;
	flex-basis: 100%;
	margin-top: 8px;
}

.comment-text {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.comments .prev-next-link, .tag-form .prev-next-link {
	padding: 3px 5px 5px 5px;
	font-size: 12px;
}

/* The icons of the "Сохранить" and "Отменить" buttons. */
.icon-ok {
	color: green;
}

.icon-cancel {
	color: red;
}

/* "Сохранить" on the left, "Отменить" at the right edge. */
.comment-buttons {
	display: flex;
	justify-content: space-between;
}

.comments textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: inherit;
	margin: 0px 0px 8px 0px;
}

/* Битая ссылка на старую хронику (/old/ больше не раздаётся) */
a.link-broken {
	border: 3px solid red;
	border-radius: 3px;
	padding: 0 3px;
}
