/*!
 * Senats Republjiki Vilgerskej · senats.vilgeria.com
 * © 2026 RV Software Board. All rights reserved.
 * Дополнения к portal.css (оформление mer): документы, содержание, схема мест, статусы законопроектов.
 */

.hemi { display: block; width: 100%; height: auto; overflow: visible; }
.hemi__seat { fill: rgba(8, 21, 14, 0.25); stroke: var(--g-400); stroke-width: 2.5; opacity: 0; animation: seat-in 0.6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms + 150ms); transform-box: fill-box; transform-origin: center; transition: fill 0.2s, stroke 0.2s; }
.hemi__seat.is-held { fill: var(--g-400); }
.hemi__seat.is-g-b { stroke: var(--g-200); }
.hemi__seat.is-g-b.is-held { fill: var(--g-200); }
.hemi__chair { stroke: #fff; stroke-width: 4; }
.hemi__seat:hover { stroke: #fff; }
@keyframes seat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hemi-wrap { max-width: 640px; margin: 0 0 40px; }
.hemi-wrap figcaption { margin-top: 8px; font-size: 0.88rem; color: var(--dim); }
.about__fig--hemi { overflow: visible; box-shadow: none; }
.about__fig--hemi figcaption { position: static; padding: 10px 0 0; background: none; font-size: 0.88rem; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: center; color: rgba(241, 247, 243, 0.75); }

.chip--b-submitted { background: #fbefd2; color: #77520a; }
.chip--b-committee { background: #e3ebf8; color: #27498a; }
.chip--b-adopted { background: var(--g-700); color: #fff; }
.chip--b-rejected { background: #f6dcd8; color: #8a2b21; }
html[data-theme="dark"] .chip--b-submitted { background: #3a2f12; color: #f0cf8a; }
html[data-theme="dark"] .chip--b-committee { background: #182640; color: #a6c0f0; }
html[data-theme="dark"] .chip--b-adopted { background: var(--g-600); }
html[data-theme="dark"] .chip--b-rejected { background: #3a1f1b; color: #f0a79c; }

.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--line-2); }
.prose ol { padding-left: 1.3em; list-style: decimal; }
.prose ol li::marker { color: var(--g-600); }
.prose code { padding: 1px 6px; background: var(--g-100); font-size: 0.9em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.prose th { padding: 10px 14px; background: var(--g-800); color: #fff; text-align: left; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.prose td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.prose .tablewrap { margin-top: 1.2em; }

.prose--doc { max-width: none; font-size: 1rem; line-height: 1.75; }
.prose--doc > * + * { margin-top: 1em; }
.prose--doc h1 { position: relative; margin-top: 2.4em; padding-bottom: 0.5em; border-bottom: 1px solid var(--line-2); font-family: var(--font-serif); font-size: clamp(1.6rem, 2.6vw, 2.05rem); line-height: 1.2; }
.prose--doc h1::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 64px; height: 3px; background: var(--g-600); }
.prose--doc > h1:first-child { margin-top: 0; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.prose--doc h2 { margin-top: 1.9em; padding-bottom: 0.35em; border-bottom: 1px solid var(--line); font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.3; }
.prose--doc h1 em, .prose--doc h2 em { font-style: normal; }
.prose--doc h1 strong, .prose--doc h2 strong { font-weight: inherit; }
.prose--doc blockquote { font-size: 1.05rem; }

.wrap--wide, .page--doc { max-width: 1400px; }
.page--doc { grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr); gap: 40px; }
.page--doc .side { grid-column: 1; }
.page--doc .page__main { grid-column: 2; }
@media (max-width: 1300px) { .page--doc { grid-template-columns: 260px minmax(0, 1fr); } .page--doc .page__main { max-width: 760px; } }
@media (max-width: 980px) { .page--doc { grid-template-columns: minmax(0, 1fr); gap: 24px; } .page--doc .side, .page--doc .page__main { grid-column: 1; max-width: none; } }

.toc { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.toc summary { cursor: pointer; list-style: none; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.toc summary::-webkit-details-marker { display: none; }
.toc[open] summary { margin-bottom: 8px; }
.toc ol { max-height: calc(100vh - var(--nav-h) - 340px); min-height: 160px; overflow-y: auto; padding-right: 8px; }
.toc a { display: block; padding: 4px 0; font-size: 0.86rem; line-height: 1.35; color: var(--muted); transition: color 0.2s; }
.toc a:hover { color: var(--ink); }
.toc__l1 a { margin-top: 8px; color: var(--ink); font-weight: 700; }
.toc__l2 a { padding-left: 14px; }
@media (max-width: 980px) { .toc ol { max-height: 50vh; } }

.infos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1060px) { .infos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .infos { grid-template-columns: minmax(0, 1fr); } }

@view-transition { navigation: auto; }
.utility { view-transition-name: vt-top; }
.masthead { view-transition-name: vt-head; }
.mainnav { view-transition-name: vt-nav; }
::view-transition-old(root) { animation: vt-out 0.22s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 0.5s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; filter: blur(8px); transform: translateY(12px); } }

body {
    background-image:
        linear-gradient(rgba(134, 199, 160, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(134, 199, 160, 0.032) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: -1px -1px;
}

.brand .arms { filter: drop-shadow(0 0 8px rgba(134, 199, 160, 0.35)); }
.mainnav::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--g-400), transparent); background-size: 40% 100%; background-repeat: no-repeat;
    animation: nav-glow 7s ease-in-out infinite alternate;
}
@keyframes nav-glow { from { background-position: -20% 0; opacity: 0.35; } to { background-position: 120% 0; opacity: 0.9; } }
.menu__link::after { transform-origin: center; }

.shead::after, .sec__title::after {
    background: linear-gradient(90deg, var(--g-600), var(--g-400), var(--g-600)); background-size: 200% 100%;
    box-shadow: 0 0 10px rgba(134, 199, 160, 0.55); animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.stage::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 22%; z-index: 2; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(134, 199, 160, 0.12), transparent);
    transform: translateY(-110%); animation: scan 8s linear infinite;
}
@keyframes scan { to { transform: translateY(520%); } }

.callout, .minister, .mission, .ccard { position: relative; }
.info::before, .callout::before, .minister::before, .mission::before, .ccard::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(134, 199, 160, 0.16), transparent 62%);
}
.info:hover::before, .callout:hover::before, .minister:hover::before, .mission:hover::before, .ccard:hover::before { opacity: 1; }

.callout::after, .minister::after {
    content: ''; position: absolute; inset: 6px; pointer-events: none; opacity: 0.4; transition: opacity 0.3s, inset 0.3s var(--ease);
    --c: var(--g-400);
    background:
        linear-gradient(var(--c), var(--c)) top left / 12px 1px no-repeat, linear-gradient(var(--c), var(--c)) top left / 1px 12px no-repeat,
        linear-gradient(var(--c), var(--c)) top right / 12px 1px no-repeat, linear-gradient(var(--c), var(--c)) top right / 1px 12px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / 12px 1px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 1px 12px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / 12px 1px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 1px 12px no-repeat;
}
.callout:hover::after, .minister:hover::after { opacity: 1; inset: 3px; }
.info:hover, .callout:hover, .minister:hover, .ccard:hover, .mission:hover {
    border-color: rgba(134, 199, 160, 0.5);
    box-shadow: 0 0 0 1px rgba(134, 199, 160, 0.22), 0 18px 44px -20px rgba(95, 174, 126, 0.55);
}
.info, .minister, .callout, .mission, .ccard { transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.25s; }

.btn { position: relative; overflow: hidden; }
.btn::after {
    content: ''; position: absolute; top: 0; left: -70%; width: 40%; height: 100%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.32), transparent); transform: skewX(-20deg);
}
.btn:hover::after { animation: shine 0.75s var(--ease); }
@keyframes shine { to { left: 130%; } }

.hemi__arc { fill: none; stroke: var(--g-400); stroke-opacity: 0.26; stroke-width: 1; stroke-dasharray: 3 9; animation: arc-flow 34s linear infinite; }
@keyframes arc-flow { to { stroke-dashoffset: -480; } }
.hemi__seat {
    filter: drop-shadow(0 0 5px rgba(134, 199, 160, 0.5));
    animation: seat-in 0.6s var(--ease) forwards, seat-breathe 4.8s ease-in-out calc(var(--i, 0) * 90ms + 900ms) infinite;
}
.hemi__seat.is-held { filter: drop-shadow(0 0 9px rgba(134, 199, 160, 0.85)); }
.hemi__chair { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6)); }
.hemi__seat:hover { transform: scale(1.12); }
@keyframes seat-breathe { 0%, 100% { stroke-opacity: 0.55; } 50% { stroke-opacity: 1; } }

.js :is(.shead, .info, .ncard, .rows li, .minister, .callout, .mission, .ccard, .person, .about__text, .about__fig, .duties li, .princ li, .steps li, .facts, .tablewrap, .sres, .smap > section):not(.is-in) {
    opacity: 0; translate: 0 18px; filter: blur(6px);
    animation: reveal-failsafe 0s 3s forwards;
}
.js .is-in { animation: reveal 0.85s var(--ease) var(--d, 0ms) backwards; }
@keyframes reveal { from { opacity: 0; translate: 0 18px; filter: blur(6px); } }
@keyframes reveal-failsafe { to { opacity: 1; translate: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
    .js :is(.shead, .info, .ncard, .rows li, .minister, .callout, .mission, .ccard, .person, .about__text, .about__fig, .duties li, .princ li, .steps li, .facts, .tablewrap, .sres, .smap > section) { opacity: 1 !important; translate: none !important; filter: none !important; }
    .stage::after, .mainnav::after, .hemi__arc, .shead::after, .sec__title::after { animation: none !important; }
    .hemi__seat { animation: none !important; opacity: 1; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
@keyframes seat-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: none; } }

.info { gap: 6px; padding: 28px 26px 26px; border: 1px solid var(--line-2); border-radius: 6px; background: linear-gradient(160deg, var(--g-800) 0%, var(--g-900) 100%); overflow: hidden; }
.info:hover { transform: none; border-color: rgba(134, 199, 160, 0.55); box-shadow: 0 18px 44px -22px rgba(95, 174, 126, 0.6); }
.info::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--g-500), var(--g-400)); transition: width 0.5s var(--ease); pointer-events: none; }
.info:hover::after { width: 100%; }
.info .ico { width: 48px; height: 48px; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--g-400); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.info:hover .ico { border-color: var(--g-400); background: var(--g-400); color: var(--g-950); }
.info b { margin-top: 20px; font-size: 1.32rem; }
.info > span:not(.ico) { font-size: 0.94rem; }
.info__go { top: 24px; right: 22px; bottom: auto; left: auto; width: 34px; height: 34px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); transition: border-color 0.3s, color 0.3s; }
.info__go .i { transform: rotate(-45deg); transition: transform 0.35s var(--ease); }
.info:hover .info__go { border-color: var(--g-400); background: transparent; color: var(--g-400); }
.info:hover .info__go .i { transform: none; }
