:root {
  --ink:#192644; --navy:#172848; --muted:#586780; --blue:#284dd0;
  --canvas:#f6f7fb; --line:#dce1ed; --paper:#fff;
}
body,button,input,textarea,select { font-family:Manrope,"Segoe UI",sans-serif; }
body { font-size:14px; }
h1,h2,.work-title { font-family:inherit; }
h1 { font-weight:800; letter-spacing:-.05em; font-size:clamp(29px,3.2vw,48px); }
h2 { font-size:23px; letter-spacing:-.035em; }
a,button { text-underline-offset:3px; }
input,select,textarea { border:1px solid #cad3e2; border-radius:9px; }
button,.primary { border-radius:9px; font-weight:650; }
.primary,main button[type=submit],.search button { background:#294bd0; border-color:#294bd0; }
.primary:hover,main button[type=submit]:hover,.search button:hover { background:#203ba7; }
.workspace { grid-template-columns:235px minmax(0,1fr); align-items:start; }
.rail { background:#fff; border-color:var(--line); position:sticky; top:0; height:100dvh; padding:33px 16px 21px; gap:38px; z-index:12; }
.brand { gap:10px; margin-inline:9px; }
.brand b { font-size:23px; font-weight:800; letter-spacing:-1.55px; }
.brand-animal { width:42px; height:37px; }
.navigation { display:grid; align-items:stretch; gap:5px; }
.navigation a { display:flex; align-items:center; gap:13px; font-size:13px; font-weight:650; padding:12px 13px; border-radius:10px; line-height:1.35; color:#4e5e78; }
.navigation a svg { width:18px; height:18px; flex:none; }
.navigation a:hover { background:#f2f5fc; }
.navigation a[aria-current] { background:#e9eeff; color:#2545bc; }
.rail-domain { padding-left:13px; font:600 12px Manrope,sans-serif; color:#64738c; }
.rail-toggle { position:absolute; right:-12px; top:101px; width:24px; height:26px; padding:0; color:#6d7da2; font-size:10px; border:1px solid var(--line); background:white; }
.surface { min-height:100dvh; }
.topline { min-height:65px; padding:12px clamp(18px,3.2vw,52px); font-size:12px; color:#596982; }
.topline>span { display:flex; align-items:center; gap:12px; }
.topline i { font-style:normal; color:#afb8c6; }
.topline b { color:#354564; }
.initial { background:#e1e9ff; color:#2849ac; font-weight:800; }
.profile-body { border-radius:13px; box-shadow:0 12px 40px #19347622; }
.profile-body #pet-toggle[aria-pressed=true] { border-color:#a9b9f4; background:#edf2ff; }
main { max-width:1510px; padding:clamp(18px,2.4vw,36px) clamp(18px,3.2vw,52px); }
.library-hero { position:relative; isolation:isolate; overflow:hidden; background:#e6edfb; border:1px solid #d6e0f3; border-radius:22px; min-height:218px; display:flex; align-items:center; }
.library-hero::before,.identity-art { background:url("library.webp") center 55% / cover no-repeat; }
.library-hero::before { content:""; position:absolute; z-index:-1; inset:0 0 0 auto; height:100%; aspect-ratio:1.5; max-width:58%; background-position:right center; background-size:auto 103%; mask-image:linear-gradient(90deg,transparent 0%,black 34%); }
.library-hero::after { content:""; position:absolute; z-index:-1; inset:0; pointer-events:none; background:linear-gradient(90deg,#e6edfb 39%,#e6edfbde 48%,transparent 66%); }
.hero-copy { padding:clamp(23px,3vw,44px); max-width:64%; }
.hero-copy h1 { line-height:1.06; color:#16264e; }
.hero-copy .primary { margin-top:17px; font-size:12px; padding:10px 15px; }
.library-stats { display:flex; gap:24px; margin:17px 0 0; max-width:none; }
.library-stats div { display:flex; flex-direction:column-reverse; gap:1px; }
.library-stats dt,.library-stats dd { padding:0; border:none; line-height:1.22; }
.library-stats dd { font-size:21px; font-weight:750; font-variant-numeric:tabular-nums; }
.library-stats dt,.library-stats a { color:#46587a; font-size:11px; font-weight:600; text-decoration:none; }
.library-stats a:hover { text-decoration:underline; }
.catalog-filter { margin-top:17px; border-radius:14px; padding:17px 20px; }
.search label { font-size:13px; }
.search input { height:42px; background:#f8faff; }
.search button { height:42px; padding-inline:23px; }
.filters summary { display:inline list-item; font-weight:650; font-size:12px; }
.results { margin:24px 0 12px; justify-content:flex-start; }
.results h2 { display:flex; align-items:center; gap:9px; margin:0; font-size:22px; color:var(--ink); }
.results strong { font-size:12px; margin:0; padding:3px 8px; border-radius:20px; color:#475a82; background:#e8ecf5; letter-spacing:0; }
.layout-options { display:flex; gap:2px; padding:3px; margin-left:auto; background:#e8ecf5; border-radius:8px; }
.layout-options button { padding:2px 9px; border:0; border-radius:6px; background:transparent; color:#677894; }
.layout-options button[aria-pressed=true] { background:#fff; color:#234ac6; box-shadow:0 1px 3px #152b5b1c; }
.catalog-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; background:none; border:none; border-radius:0; overflow:visible; }
.catalog-row { display:flex; flex-direction:column; align-items:stretch; gap:9px; background:white; border:1px solid var(--line); border-radius:15px; padding:18px; min-width:0; box-shadow:0 2px 4px #21357004; transition:transform .18s,box-shadow .18s,border-color .18s; }
.catalog-row:hover { background:white; border-color:#aebce9; box-shadow:0 8px 26px #162b650d; transform:translateY(-2px); }
.card-meta,.card-foot { display:flex; align-items:center; gap:8px; }
.card-meta { justify-content:space-between; }
.record-stamp,.card-year,.card-foot span { font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; }
.record-stamp { color:#3e51a6; background:#edf0fd; border-radius:6px; padding:3px 8px; }
.card-year { color:#596c84; }
.work-title { font-size:clamp(16px,1.35vw,22px); line-height:1.35; letter-spacing:-.035em; font-weight:750; }
.catalog-row .card-authors { font-size:12px; margin:0 0 10px; color:#5f7088; overflow-wrap:anywhere; }
.card-foot { margin-top:auto; padding-top:10px; border-top:1px solid #e8ebf3; }
.card-foot span { color:#375f87; }
.card-foot small { font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.card-foot i { margin-left:auto; font-style:normal; color:var(--blue); }
html[data-layout=list] .catalog-list { grid-template-columns:1fr; gap:7px; }
html[data-layout=list] .catalog-row { display:grid; grid-template-columns:66px minmax(0,1.4fr) minmax(0,1fr); align-items:center; gap:14px; }
html[data-layout=list] .card-meta { flex-direction:column; align-items:flex-start; }
html[data-layout=list] .card-foot { display:none; }
html[data-layout=list] .card-authors { margin:0; }
.pages { margin:14px 0; border:none; gap:12px; }
.pages a { background:white; border:1px solid var(--line); border-radius:8px; padding:6px 12px; text-decoration:none; }
#catalog-results { scroll-margin-top:12px; outline:0; }
.record-form,.publication-form { max-width:1000px; }
.paper,.record-form:not(.publication-form),.publication-form>fieldset,.publication-form>details,.authors,.table-wrap,.empty { border-radius:13px; }
.publication-form>fieldset,.publication-form>details { padding:clamp(14px,2vw,26px); margin:14px 0; border-color:#d4ddea; }
.field label,fieldset legend,details summary { font-weight:700; }
dt,.crumb,th { color:#4c6080; }
th { background:#eef2fa; font-size:12px; }
td,th { padding:10px 12px; }
.table-wrap { background:white; border:1px solid var(--line); }
.table-wrap td,.table-wrap th { border-width:0 0 1px; }
main>ul { list-style:none; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr)); gap:9px; }
main>ul>li { background:white; border:1px solid var(--line); padding:14px; border-radius:10px; }
main>ul>li small { display:block; }
.guest .rail { height:auto; position:static; background:white; }
.guest main { padding-block:30px; }
.login-panel { width:min(940px,100%); grid-template-columns:1.08fr 1fr; border-radius:22px; box-shadow:0 20px 70px #243a6e10; }
.identity { position:relative; overflow:hidden; min-height:415px; display:flex; flex-direction:column; align-items:stretch; justify-content:end; text-align:left; background:#e6edfb; padding:0; border:none; }
.identity-art { position:absolute; inset:0 0 27%; background-position:65% 54%; }
.identity-copy { position:relative; padding:35px 32px 27px; background:linear-gradient(transparent,#e6edfb 22%); }
.wordmark { display:grid; font-weight:800; font-size:43px; letter-spacing:-.07em; line-height:1.2; color:#243c84; }
.wordmark>span { grid-area:1 / 1; }
.sql-word { opacity:0; animation:sql-fade 1.65s both; }
.ru-word { animation:ru-arrive 1.65s both; }
@keyframes sql-fade { 0%,38% {opacity:1} 74%,100% {opacity:0;transform:translateY(-14px)} }
@keyframes ru-arrive { 0%,40% {opacity:0;transform:translateY(12px)} 85%,100% {opacity:1;transform:none} }
.identity p { font:600 13px/1.6 Manrope,sans-serif; max-width:305px; color:#455a80; }
.signin { display:flex; flex-direction:column; justify-content:center; padding:clamp(24px,4vw,60px); }
.signin h1 { font-size:34px; }
.signin .record-form { border:0; padding:0; }
.signin input { height:42px; }
.guest footer { text-align:center; }
#pet-stage { position:fixed; inset:0; z-index:2147483600; pointer-events:none; overflow:hidden; }
#pet-stage.hidden,#pet-stage.pointer-outside:not(.pet-working) { visibility:hidden; }
.elephant-cursor,.elephant-cursor * { cursor:none!important; }
#mascot,#cursor-hotspot { position:absolute; top:0; left:0; will-change:transform; }
#mascot,.pet-sprite { width:100px; height:100px; }
.pet-sprite { background:url("elephant-sprites.png") 0 0 / 400% 400%; }
#cursor-hotspot { width:10px; height:10px; z-index:2; border:2px solid #fff; border-radius:100%; background:#26daff; box-shadow:0 0 0 2px #2259c4; }
#cursor-hotspot.active-target { background:#ffe55e; }
#mascot-speech,.pet-thinking { display:none; }
.pet.speaking #mascot-speech { display:block; position:absolute; left:60px; bottom:84px; background:#fff; color:#223856; border:1px solid #cdd9ed; border-radius:12px; padding:6px 10px; width:max-content; max-width:180px; font-size:11px; box-shadow:0 4px 16px #13294a17; }
.pet.near-right #mascot-speech { left:auto; right:40px; }
.pet.near-top #mascot-speech { top:85px; bottom:auto; }
.paper-stage { position:fixed; z-index:99; pointer-events:none; overflow:visible; }
.paper-front { position:absolute; inset:0; overflow:hidden; background:var(--canvas); }
.paper-fold { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
@media(min-width:801px) {
  html.compact .workspace { grid-template-columns:78px minmax(0,1fr); }
  html.compact .rail { padding-inline:10px; }
  html.compact .rail .brand { margin:0 auto; }
  html.compact .rail .brand b,html.compact .nav-text,html.compact .workspace .rail-domain { display:none; }
  html.compact .navigation a { justify-content:center; }
}
@media(max-width:1120px) { .catalog-list {grid-template-columns:repeat(2,minmax(0,1fr));} }
@media(max-width:800px) {
  .workspace {grid-template-columns:minmax(0,1fr);}
  .workspace .rail { height:auto; position:relative; padding:12px 16px 8px; gap:10px; }
  .brand { margin:0; } .brand-animal { width:32px;height:29px; }
  .navigation { display:flex; align-items:center; flex-wrap:nowrap; }
  .navigation a { padding:7px 10px; gap:7px; } .rail-toggle {display:none;}
  .topline {min-height:44px;} .topline>span {display:block;} .topline i,.topline b {display:none;}
  .surface {min-height:75vh;} .hero-copy {max-width:70%;}
}
@media(max-width:600px) {
  main {padding-inline:13px;} .hero-copy {max-width:81%;padding:20px;} .hero-copy h1 {font-size:30px;max-width:210px;}
  .library-hero {min-height:190px;border-radius:16px;} .library-hero::before {left:43%; background-position:80% center; background-size:auto 90%; mask-image:linear-gradient(90deg,transparent,#000 24%);} .library-hero::after {background:linear-gradient(90deg,#e6edfb 44%,#e6edfbad 54%,transparent 73%);}
  .library-stats {gap:12px;} .library-stats dd {font-size:17px;} .library-stats dt {font-size:10px;}
  .catalog-list {grid-template-columns:1fr;} .catalog-filter,.catalog-row {padding:15px;}
  html[data-layout=list] .catalog-row {grid-template-columns:54px minmax(0,1fr);}
  html[data-layout=list] .card-authors {grid-column:2;} .login-panel {grid-template-columns:1fr;}
  .identity {min-height:165px;justify-content:center;} .identity-art {inset:0 0 0 40%;} .identity-copy {width:67%;padding:20px;background:linear-gradient(90deg,#e6edfb 70%,transparent);}
  .wordmark {font-size:33px;} .identity p {font-size:11px;max-width:175px;} .signin {padding:24px;}
}
@media(prefers-reduced-motion:reduce) { .sql-word {display:none;} .ru-word {animation:none;} .catalog-row {transition:none;} }
