/* Базовые стили публичной страницы справки — светлая тема, как предпросмотр */
:root {
	color-scheme: light;
}
.public-project {
	max-width: 100vw;
	margin: 16px auto;
	padding: 0 12px;
	display: flex;
	flex-direction: row;
	gap: 16px;
}
.public-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	gap: 12px;
    position: sticky;
    top: 0;
}
.public-header-left {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex: 1;
	gap: 12px;
}
.public-header-right {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}
.project-tree {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	min-height: 60vh;
	max-width: 350px;
	overflow: hidden;
	padding: 8px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.project-info {
	padding: 8px 8px 12px;
	border-bottom: 1px solid #e5e7eb;
}
.project-info-title {
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 4px;
}
.project-info-desc {
	color: #475569;
	font-size: 12px;
}
.project-content {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
#project-content {
	flex: 1 1 auto;
	overflow: auto;
	padding: 3px 8px;
	max-height: calc(100vh - 250px);
	min-height: 70vh;
}
.project-title {
	font-size: 18px;
	font-weight: bold;
	margin: 0;
	text-align: center;
}
.project-logo {
	text-align: center;
}
.project-logo img {
	max-width: 300px;
	max-height: 200px;
	border-radius: 6px;
}
.tree-title {
	font-weight: 700;
	margin: 6px 0 8px;
	text-align: center;
}
.tree-list a {
	display: block;
	padding: 6px 8px;
	border-radius: 6px;
	color: #2563eb;
	text-decoration: none;
}
.tree-list#left-tree {
	flex: 1 1 auto;
	overflow: auto;
}
.tree-list a:hover {
	background: #f1f5f9;
}
.tile {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 6px;
	margin: 2px 0;
	border: 1px solid #e5e7eb;
	cursor: pointer;
}
.tile.page {
	border-color: #c7d2fe;
	background: #eef2ff;
}
.tile:hover {
	background: #c5d2ff;
}
.tile.active {
    background: #c5d2ff;
    border-color: #2b55ff;
}
.tile .tile-title {
	color: #2563eb;
	cursor: pointer;
}
.tile .tile-expand {
	margin-left: auto;
	background: #f1f5f9;
	border: 0;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	cursor: pointer;
}
.tile-children {
    margin-left: 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .3s ease, opacity .2s ease;
}
.tile-children.open {
    max-height: 9999px;
    opacity: 1;
}
.tile.favorite {
	border-color: #ffee00;
	background: #ffee0033;
}
.tile.favorite:hover {
	background: #ffee0066;
}

.input, input[type=text], input[type=number], input[type=password], input[type=email], textarea, select {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: #0f172a;
	padding: 6px 8px;
	outline: none;
}
#search {
	min-width: 300px;
}
#search:focus {
	outline: none;
	border-color: #a4b9e5;
}
.project-content-inner {
	flex: 1 1 auto;
	overflow: auto;
}
#breadcrumbs {
	margin: 0 0 4px 8px;
    font-size: 13px;
}
.crumb-link {
	color: #2563eb;
	text-decoration: none;
}
.crumb-link:hover {
	text-decoration: underline;
}
.crumb {
	font-weight: bold;
	color: #475569;
}

#searchResults .breadcrumb-item, #searchResults .breadcrumb-sep {
	font-size: 16px;
}
#searchResults .breadcrumb-item {
	cursor: pointer;
	text-decoration: none;
}
#searchResults .breadcrumb-item:hover {
	text-decoration: underline;
}
/* Right panel: collapsible sections; pages as larger tiles */
.section-list {
	margin: 6px 0 6px 0;
}
.section-tile {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
	margin: 4px 0;
	background: #ffffff;
	cursor: pointer;
}
.project-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    color: #9ca3af;
}
.section-title {
	color: #111827;
	font-weight: 600;
}
.section-expand {
	background: #f1f5f9;
	border: 0;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	cursor: pointer;
	text-align: center;
}
.section-children {
    margin-left: 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .3s ease, opacity .2s ease;
}
.section-children.open {
    max-height: 9999px;
    opacity: 1;
}
.section-item {
	padding: 6px 8px;
	margin: 2px 0;
	border-radius: 6px;
	border: 1px dashed #e5e7eb;
}
.section-item.section-page {
	border: 1px solid #c7d2fe;
	background: #eef2ff;
	padding: 10px 12px;
	font-size: 14px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
	cursor: pointer;
}
html,
body {
	margin: 0;
	padding: 0;
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	line-height: 1.6;
	background: #ffffff;
	color: #0f172a;
}
.public-root {
	max-width: 920px;
	margin: 24px auto;
	padding: 0 16px 48px;
}
/* Footer */
.public-footer {
	margin: 0 12px 12px 12px;
	padding: 10px 12px;
	border: 1px dashed #e5e7eb;
	border-radius: 10px;
	background: #f8fafc;
	color: #475569;
}
.public-footer-inner {
	text-align: center;
	font-size: 12px;
}
/******************************************** PUBLIC PAGE ********************************************/
.public-title {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 10px 0;
	color: #0f172a;
}
.public-desc {
	color: #475569;
	margin: 0 0 20px 0;
}
.block {
	background: #ffffff;
	border: none;
	border-radius: 6px;
	overflow: hidden;
}
.block .block-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid #f1f5f9;
	background: #f8fafc;
}
.block.align-left .block-content {
	text-align: left;
}
.block.align-center .block-content {
	text-align: center;
}
.block.align-right .block-content {
	text-align: right;
}
/* Типографика */
.block .block-content a {
	color: #2563eb;
	font-size: 14px;
}
.block .block-content a:hover {
	text-shadow: 2px 2px 3px rgb(44 44 44 / 50%);
}
.block .block-content h1 {
	font-size: 28px;
	line-height: 1.25;
	margin: 0 0 12px;
}
.block .block-content h2 {
	font-size: 24px;
	line-height: 1.3;
	margin: 18px 0 10px;
}
.block .block-content h3 {
	font-size: 20px;
	line-height: 1.35;
	margin: 16px 0 8px;
}
.block .block-content p {
	margin: 10px 0;
}
.block .block-content ul {
	padding-left: 20px;
	margin: 10px 0;
}
.block .block-content li {
	margin: 6px 0;
}
.block .block-content pre {
	margin: 0px;
	max-height: 200px;
	overflow: auto;
	color: #e2e8f0;
	background: #0f172a;
	border: none;
}
.block .block-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	padding: 2px 6px;
	background: none;
	max-height: 190px;
	text-align: left;
	font-size: 12px;
    display: flex;
    flex-direction: column;
}

/* Изображения и модалка */
.image-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}
.image-modal-overlay.open {
	display: flex;
}
.image-modal-box {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	max-width: 92vw;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	padding: 12px;
	position: relative;
}
.image-modal-box .image-modal-close {
	position: absolute;
	right: 10px;
	top: 10px;
	background: #0f172a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 6px 8px;
	cursor: pointer;
}
.image-modal-box .image-modal-inner {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-modal-box img {
    display: block;
    border-radius: 8px;
    box-shadow: none;
    max-width: unset;
    max-height: unset;
    cursor: grab;
}
.image-zoom-wrap {
    will-change: transform;
}
.img-wrap {
	position: relative;
	display: inline-block;
}
.img-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .25s ease;
	cursor: zoom-in;
}
.img-overlay .img-overlay-icon {
	color: #fff;
	font-size: 26px;
}
.img-overlay.show {
	opacity: 1;
	display: flex !important;
}
.muted {
	color: #64748b;
	font-size: 11px;
}

/* Подсветка цели: золотистая пульсация */
.spotlight-pulse {
	position: relative !important;
	outline: 2px solid rgba(255, 196, 0, 0.85) !important;
	box-shadow: 0 0 0 6px rgba(255, 196, 0, 0.25), 0 0 0 12px rgba(255, 196, 0, 0.12) !important;
	transition: outline-color 200ms ease !important;
  }
  .spotlight-pulse::after {
	content: '';
	position: absolute !important;
	inset: -8px !important;
	border: 3px solid rgba(255, 196, 0, 0.55) !important;
	border-radius: 8px !important;
	animation: spotlightPulse 900ms ease-in-out infinite !important;
	pointer-events: none;
	z-index: 999999;
  }
  @keyframes spotlightPulse {
	0% { opacity: 0.7; transform: scale(0.98); }
	50% { opacity: 0.15; transform: scale(1.04); }
	100% { opacity: 0.7; transform: scale(0.98); }
  }

/* Подсказки */
.hint {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #60a5fa33;
	border-inline: 4px solid #60a5fa;
	padding: 6px 10px;
	border-radius: 8px;
	color: #0f172a;
}
.hint .hint-inner {
	display: flex;
	gap: 10px;
	align-items: center;
}
.hint .hint-icon {
	flex: 0 0 auto;
	line-height: 1;
	font-size: 26px;
	margin-top: 2px;
}
.hint .hint-content {
	flex: 1 1 auto;
}
.hint.success {
	color: #10b981;
	border-inline-color: #10b981;
	background: #10b98133;
}
.hint.info {
	color: #505050;
	border-inline-color: #505050;
	background: #50505033;
}
.hint.advise {
	color: #0073ff;
	border-inline-color: #0073ff;
	background: #0073ff33;
}
.hint.warning {
	color: #f19100;
	border-inline-color: #f19100;
	background: #f1910033;
}
.hint.error {
	color: #970808;
	border-inline-color: #970808;
	background: #97080833;
}
.hint.success a {
	color: #10b981;
}
.hint.info a {
	color: #505050;
}
.hint.advise a {
	color: #0073ff;
}
.hint.warning a {
	color: #f19100;
}
.hint.error a {
	color: #970808;
}

.url-list a {
	color: #2563eb;
	text-decoration: none;
}
.url-list a:hover {
	text-decoration: underline;
}
/* Кнопки */
.hbtn {
	background: #1d4ed8;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 13px;
	cursor: pointer;
    min-height: max-content;
    min-width: max-content;
	text-decoration: none;
}
.accent-btn {
	padding: 2px 4px;
    display: flex;
    gap: 4px;
    align-items: center;
	justify-content: center;
}
.accent-btn i {
	font-size: 22px;
}
.btn-no {
	background: none;
	border: none;
	color: #fff;
}
.btn-no:hover {
	background: none;
}
.btn-copy {
	margin-left: auto;
	display: flex;
	gap: 4px;
	align-items: center;
}
.btn-copy:hover {
	background: #1f2937;
}
.btns-wrap {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 4px;
    flex-wrap: wrap;
    box-sizing: border-box;
}
.btns-wrap .hbtn {
	padding: 2px 6px;
}
.btn-logout {
	background: none;
	color: #ff0000;
}
.btn-logout:hover {
	background: #ff000071;
	color: #fff;
}
.btn-profile {
    background: none;
    color: #2563eb;
}
.btn-profile:hover {
	background: #2564eb8e;
	color: #fff;
}
.btn-cancel {
	background: none;
	color: #ff0000;
}
.btn-cancel:hover {
	background: #ff000071;
	color: #fff;
}
.btn-projects {
	background: #5980f0;
	color: #fff;
}
.btn-projects:hover {
	background: #325fe6;
	color: #fff;
}
.btn-favorite, .btn-no-favorite {
	background: none;
	color: #ff992e;
	font-size: 24px;
}
.btn-favorite:hover, .btn-no-favorite:hover {
    color: #ff992e;
    -webkit-text-stroke: 1px rgba(255,153,46,0.7);
}
#favoritesList a {
    text-decoration: none;
    font-size: 16px;
}
#favoritesList a:hover {
    text-decoration: underline;
    font-size: 16px;
}

/* Блоки кода */
.code-block .code-head {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 12px;
	display: flex;
	justify-content: space-between;
	gap: 4px;
	align-items: center;
	padding: 3px 4px;
	background: #b6ceff;
	border: 1px solid #e5e7eb;
	border-bottom: 0;
	border-radius: 6px 6px 0 0;
}
.code-head-title {
	display: flex;
	gap: 10px;
	align-items: center;
}
.code-head-title-lang {
    font-weight: bold;
    border: 1px dashed #8e8e8e;
    border-radius: 6px;
    padding: 2px 10px !important;
    background: #453975;
    color: #ffffff;
    min-width: max-content;
	display: flex;
	gap: 4px;
	align-items: center;
}
.code-head-title-title {
    font-weight: bold;
    font-size: 14px;
}
.with-line-numbers {
	counter-reset: line;
}
.with-line-numbers > span {
	display: block;
    padding: 0 8px 0 42px;
	position: relative;
	line-height: 1.2;
	word-break: break-word;
    white-space: pre-wrap;
}
.with-line-numbers > span:before {
    counter-increment: line;
    content: counter(line);
    position: absolute;
    left: 8px;
    color: #9ca3af;
    width: 24px;
    text-align: right;
    border-right: 1px solid;
    padding-right: 4px;
}

/* Подсветка синтаксиса */
.tok-kw {
    color: #60a5fa;
}
.tok-str {
    color: #a7f3d0;
}
.tok-cmt {
    color: #9ca3af;
}
.tok-num {
    color: #fbbf24;
}
.tok-tag {
    color: #fdba74;
}
.tok-attr {
    color: #93c5fd;
}
.tok-val {
    color: #a7f3d0;
}
.modal-overlay {
	background: rgba(0, 0, 0, 0.6);
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	backdrop-filter: blur(5px);
}
.modal-box {
	background: #ffffff;
	color: #000000;
	border: 1px solid #374151;
	border-radius: 10px;
	width: min(520px, 92vw);
	max-width: 96vw;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border-bottom: 1px solid #1f2937;
}
.modal-title {
	font-weight: 700;
}
.modal-close {
	background: none;
	border: 0;
	color: #9d9d9d;
	cursor: pointer;
	font-size: 22px;
}
.modal-body {
	padding: 12px 14px;
}
.modal-body label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 8px 0;
}
.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 14px 16px 14px;
	border-top: 1px solid #1f2937;
}
.photo-preview {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	overflow: hidden;
	background: #111827;
	display: flex;
	align-items: center;
	justify-content: center;
}
.file-drop {
	flex: 1;
	min-height: 80px;
	border: 1px dashed #374151;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.file-drop .big {
	font-size: 48px;
}
.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    padding: 12px;
}
.proj-card {
    display: flex;
    flex-direction: column;
	align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    color: #000000;
}
.proj-card:hover {
    border: 2px solid #4680ff;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}
.proj-card.disabled {
    pointer-events: none;
    opacity: 0.7;
    border-style: dashed;
}
.proj-logo {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    background: none;
}
.proj-logo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background: none;
}
.proj-logo i {
	color: #475569;
	font-size: 80px;
}
.proj-name {
    font-weight: 700;
}
.proj-desc {
    color: #475569;
    font-size: 13px;
}

@media (max-width: 768px) {
    .public-root {
        padding: 0 16px 24px;
    }
	.public-title {
		font-size: 22px;
		margin: -14px 0 10px 0;
	}
	.btns-wrap {
		flex-direction: column;
	}
}