/* Berlin extension, https://github.com/annaesvensson/yellow-berlin */

/* Colors and fonts */

:root {
    --bg: #fff;
    --code-bg: #f2f2f2;
    --important-bg: #f0f8fe;
    --header-bg: #000;
    --header-link: #fff;
    --header-link-active: #bbb;
    --heading: #111;
    --heading-light: #444;
    --text: #555;
    --code: #555;
    --link: #07d;
    --blockquote-accent: #ddd;
    --separator: #ddd;
    --border: #bbb;
    --font: "Courier New","Open Sans", Helvetica, sans-serif;
    --monospace-font: Consolas, Menlo, Courier, monospace;

}
@font-face {
	font-family: "Courier New";
	src: url("fonts/courier-new.eot"); /* IE9 Compat Modes */
	src: url("fonts/courier-new.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
		url("fonts/courier-new.otf") format("opentype"), /* Open Type Font */
		url("fonts/courier-new.svg") format("svg"), /* Legacy iOS */
		url("fonts/courier-new.ttf") format("truetype"), /* Safari, Android, iOS */
		url("fonts/courier-new.woff") format("woff"), /* Modern Browsers */
		url("fonts/courier-new.woff2") format("woff2"); /* Modern Browsers */
	font-weight: normal;
	font-style: normal;
}
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(berlin-opensans-light.woff) format("woff");
}
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(berlin-opensans-regular.woff) format("woff");
}
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(berlin-opensans-bold.woff) format("woff"); 
}

/* General */

html, body, div, form, pre, span, tr, th, td, img {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
}
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1em;
    font-weight: 300;
    line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
}
h1 {
    font-size: 2.9em;
    color: var(--heading);
}
h2 {
    font-size: 1.6em;
    color: var(--heading-light);
}
h3 {
    font-size: 1.5em;
    color: var(--heading-light);
}
hr {
    height: 1px;
    background: var(--separator);
    border: 0;
}
strong {
    font-weight: bold;
}
code {
    font-size: 1.1em;
}
a {
    color: var(--link);
    text-decoration: none;
}
a:hover {
    color: var(--link);
    text-decoration: underline;
}

/* Content */

.content h1 a {
    color: var(--heading);
}
.content h1 a:hover {
    text-decoration: none;
}
.content img {
    max-width: 100%;
    height: auto;
}
.content form {
    margin: 1em 0;
}
.content table {
    border-spacing: 0;
    border-collapse: collapse;
}
.content th:not([align]) {
    text-align: left;
}
.content th,
.content td {
    padding: 0.3em;
    padding-left: 2em;
}
.content th:first-child,
.content td:first-child {
    padding: 0.3em;
}
.content td {
    border-top: 1px solid var(--separator);
    border-bottom: 1px solid var(--separator);
}
.content code,
.content pre {
    font-family: var(--monospace-font);
    font-size: 90%;
}
.content code {
    padding: 0.15em 0.4em;
    margin: 0;
    background-color: var(--code-bg);
    color: var(--code);
    border-radius: 3px;
}
.content pre > code {
    padding: 0;
    margin: 0;
    white-space: pre;
    background: transparent;
    border: 0;
    font-size: inherit;
}
.content pre {
    padding: 1em;
    overflow: auto;
    line-height: 1.45;
    background-color: var(--code-bg);
    color: var(--code);
    border-radius: 3px;
}
.content blockquote {
    margin-left: 0;
    padding-left: 1em;
    border-left: 1px solid var(--blockquote-accent);
}
.content details summary {
    margin: inherit;
    cursor: pointer;
}
.content details > * {
    margin: 1em 0 1em 1em;
}
.content .important {
    margin: 1em 0;
    padding: 10px 1em;
    background-color: var(--important-bg);
    border-radius: 3px;
}
.content .flexible {
    position: relative;
    padding-top: 0;
    padding-bottom: 56.25%;
}
.content .flexible iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.content .task-list-item {
    list-style-type: none;
}
.content .task-list-item input {
    margin: 0 0.2em 0.25em -1.75em;
    vertical-align: middle;
}
.content .toc {
    margin: 0;
    padding: 0;
    list-style: none;
}
.content .previousnext .previous {
    margin-right: 1em;
}
.content .pagination .previous {
    margin-right: 1em;
}
.content .pagination {
    margin: 1em 0;
}
.content .left {
    float: left;
    margin: 0 1em 0 0;
}
.content .center {
    display: block;
    margin: 0 auto;
}
.content .right {
    float: right;
    margin: 0 0 0 1em;
}
.content .rounded {
    border-radius: 4px;
}

/* Header */

.header {
    background-color: var(--header-bg);
}
.header .sitename {
    display: none;
}

/* Navigation */

.navigation {
    line-height: 2.5;
}
.navigation a {
    color: var(--header-link);
    margin-right: 2em;
    display: inline-block;
}
.navigation a:hover {
    color: var(--header-link-active);
    transition: color 0.2s;
    text-decoration: none;
}
.navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.navigation li a.active {
    color: var(--header-link-active);
}
.navigation li {
    display: inline;
}
.double-border{
  padding: 1rem;
  background: linear-gradient(#fff,#fafafa);
  border: 1px solid #eee;
  box-shadow: inset 0 0 0 2px #ffffff, 0 6px 18px rgba(16,24,40,0.12);
  border-radius: 10px;
}

/* Footer */

.footer {
    background:#f8fafc;
    font-size: 12px;
    color:#0f172a;
    border-top:1px solid rgba(2,6,23,0.04);
    padding:10px 8px;
}

/* Sidebar */

.with-sidebar .main {
    margin-right: 17em;
}
.with-sidebar .sidebar {
    float: right;
    width: 16em;
    margin-top: 6.8em;
    padding: 2px;
    overflow: hidden;
    font-size: 0.9em;
}
.with-sidebar .sidebar .search-form input {
    width: 100%;
    box-sizing: border-box;
}
.with-sidebar .content:after {
    content: "";
    display: table;
    clear: both;
}

/* Forms and buttons */

.form-control {
    margin: 0;
    padding: 2px 4px;
    display: inline-block;
    min-width: 7em;
    background-color: var(--bg);
    color: var(--text);
    background-image: linear-gradient(to bottom, var(--bg), var(--bg));
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
    font-weight: normal;
    line-height: normal;
}
/*.btn {
    margin: 0;
    padding: 4px 22px;
    display: inline-block;
    min-width: 9em;
    background-color: #eaeaea;
    color: #333333;
    background-image: linear-gradient(to bottom, #f8f8f8, #e1e1e1);
    border: 1px solid var(--border);
    border-color: #c1c1c1 #c1c1c1 #aaaaaa;
    border-radius: 4px;
    outline-offset: -2px;
    font-size: 0.9em;
    font-family: Verdana, "Open Sans";
    font-weight: normal;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
.btn:hover,
.btn:focus,
.btn:active {
    color: #333333;
    background-image: none;
    text-decoration: none;
}
.btn:active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}*/
.btn{
  display:inline-block;
  padding:8px 14px;
  border-radius:6px;
  border: 1px solid #eeeeee;
  background:#f7f7f7; /* серый */
  color:#333333;
  font-weight:500;
  font-size:inherit;
  font-family: Courier New, Helvetica, Sans-Serif;
  cursor:pointer;
  transition:transform .12s ease, filter .12s ease;
}
.btn:hover{ transform:translateY(-2px); filter:brightness(1.05); }
.btn:active{ transform:translateY(0); }
.btn:focus{ outline:2px solid rgba(37,99,235,0.25); outline-offset:2px; }

/* Карточка */

:root{
  --bg:#ffffff;
  --card:#f8fafc;
  --accent:#2563eb;
  --muted:#64748b;
  --radius:10px;
  --gap:12px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Основная карточка */
.fancy{
  background:linear-gradient(180deg,var(--card), #fff);
  border-radius:var(--radius);
  border:1px solid rgba(15,23,42,0.06);
  padding:10px;
  box-shadow: 0 8px 20px rgba(2,6,23,0.04);
  max-width:720px;
  margin:8px 0;
  overflow:hidden;
}

/* Стили summary */
.fancy summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:var(--gap);
  padding:8px 6px;
  border-radius:8px;
  user-select:none;
  outline:none;
}

/* Внешний вид заголовка */
.fancy summary::-webkit-details-marker{ display:none; } /* убрать маркер в Safari/Chrome */
.fancy summary .title{
  font-weight:600;
  color:#0f172a;
  font-size:16px;
}
.fancy summary .meta{
  margin-left:auto;
  color:var(--muted);
  font-size:13px;
}

/* Стрелка */
.fancy summary::before{
  content:"";
  width:18px; height:18px;
  display:inline-block;
  flex:0 0 18px;
  background:linear-gradient(180deg,var(--accent), #4f46e5);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>') no-repeat 50%/contain;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>') no-repeat 50%/contain;
  transform-origin:50% 50%;
  transition:transform .22s cubic-bezier(.2,.9,.2,1);
  border-radius:6px;
  box-shadow: 0 6px 14px rgba(37,99,235,0.12);
}

/* Анимация стрелки при открытии */
.fancy[open] summary::before{ transform:rotate(180deg); }

/* Контент — скрываем/показываем с анимацией высоты */
.fancy .content{
  padding:0 6px 10px 6px;
  color:#0f172a;
  font-size:14px;
  line-height:1.5;
  margin-top:8px;
  /* начальное состояние для анимации */
  max-height:0;
  overflow:hidden;
  transition: max-height 280ms ease, opacity 220ms ease, transform 220ms ease;
  opacity:0;
  transform:translateY(-6px);
}

/* Когда открыт — расширяем */
.fancy[open] .content{
  max-height:1000px; /* достаточно большое значение для плавности */
  opacity:1;
  transform:translateY(0);
}

/* Внутренние элементы — аккуратные отступы */
.fancy .content > * + *{ margin-top:10px; }

/* Фокус и доступность */
.fancy summary:focus{
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
  border-radius:8px;
}

/* Вариант без фоновой полосы при наведении, мягкое выделение */
.fancy summary:hover{ background:rgba(37,99,235,0.03); }

/* Малые экраны */
@media (max-width:420px){
  .fancy{ padding:8px; }
  .fancy summary .title{ font-size:15px; }
}

/* Responsive and print */

.content,
.siteinfo {
    margin: 0 auto;
    padding: 0 1em;
    max-width: 1000px;
}
.navigation {
    margin: 0 auto;
    padding: 0 1em;
    max-width: 1000px;
}
.yellow-bar {
    margin: 0em auto;
    padding: 0.7em 1em;
    max-width: 1000px;
}
.yellow-bar a {
    color: var(--text);
    text-decoration: none;
}
.yellow-bar a:hover {
    color: var(--text);
    text-decoration: underline;
}
.yellow-dropdown a {
    color: var(--text);
}
.yellow-dropdown a:hover,
.yellow-toolbar a:hover {
    background-color: #f90;
    border-color: #f90;
}
.yellow-toolbar .yellow-toolbar-btn-edit {
    background-color: #fa1;
    border-color: #fa1;
    color: #fff;
}
.yellow-toolbar .yellow-toolbar-btn-create {
    background-color: #fa1;
    border-color: #fa1;
    color: #fff;
}
.yellow-pane form h1 {
    font-size: 2.5em;
}

@media screen and (max-width: 32em) {
    body {
        font-size: 0.9em;
    }
    .content h1,
    .content h2 {
        font-size: 1.6em;
    }
    .with-sidebar .main {
        margin-right: 0;
    }
    .with-sidebar .sidebar {
        display: none;
    }
}
@media print {
    .page {
        border: none !important;
    }
}
/* Картинки */
.img-soft {
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  margin: 0 auto;
  justify-content: center;
}

/* Сбрасываем отступы/блочные свойства у вложенного img */
.img-soft img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}



/* Custom */