:root{--bg:#f3f4f4;--card:#fff;--brand:#6672b3;--brand2:#515c9d;--mint:#70e0ac;--ink:#232638;--muted:#70748a;--danger:#cc4b55;--line:#e4e5ea;--shadow:0 8px 28px rgba(48,52,82,.08);--r:16px}*{box-sizing:border-box}html [hidden],html form[hidden],html .collapsible-form[hidden],html .editor-preview[hidden]{display:none!important}html{font-size:16px}body{min-height:100vh;margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;line-height:1.55;display:flex;flex-direction:column}.top{min-height:64px;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:8px max(4%,calc((100% - 1300px)/2));position:sticky;top:0;z-index:20;box-shadow:0 3px 16px #424b8055}.logo{display:flex;align-items:center;gap:8px;color:#fff;text-decoration:none;font-size:21px;white-space:nowrap}.logo span{font-size:27px}.logo b{font-family:"Comic Sans MS","Segoe Print",cursive;letter-spacing:.4px}.top nav{display:flex;align-items:center;gap:4px;overflow-x:auto}.top nav a{color:#fff;text-decoration:none;padding:10px 9px;border-radius:10px;font-size:14px;white-space:nowrap}.top nav a:hover{background:#ffffff18}.top .points,.reward{color:#183f31;background:var(--mint);font-weight:700}.wrap{width:min(1040px,92%);margin:24px auto 0;flex:1;display:flex;flex-direction:column}.hero{background:linear-gradient(135deg,#6672b3,#545f9e);color:#fff;border-radius:24px;padding:34px 24px;box-shadow:var(--shadow);display:grid;gap:26px;margin-bottom:24px}.hero h1{font-size:clamp(35px,10vw,62px);line-height:1.02;margin:9px 0 16px;letter-spacing:-2px}.hero p{font-size:18px;max-width:550px}.eyebrow{text-transform:uppercase;letter-spacing:1.5px;font-size:12px;font-weight:700;color:#dfe2ff}.quick{display:flex;flex-direction:column;gap:9px;align-self:end}.quick small{color:#eef0ff}.card{background:var(--card);border-radius:var(--r);padding:20px;margin:16px 0;box-shadow:var(--shadow)}h1,h2,h3{line-height:1.2}h1{font-size:32px;letter-spacing:-.8px}h2{font-size:22px;margin:14px 0 10px}h3{margin-top:30px}.lead{color:var(--muted);font-size:18px}.author{display:flex;align-items:center;gap:10px}.author>div{display:flex;flex-direction:column}.avatar{width:42px;height:42px;border-radius:14px;background:#e8eafb;color:var(--brand2);display:grid;place-items:center;font-weight:800}.avatar.xl{width:76px;height:76px;font-size:28px;border-radius:24px}.author small,.card small,.bubble small,.notice small{display:block;color:var(--muted);font-size:12px}.reward{margin-left:auto;padding:6px 10px;border-radius:99px;font-size:13px}.online{font-size:11px;color:#148155;margin-left:6px}.online:before{content:'●';margin-right:3px}.prose{overflow-wrap:anywhere}.prose code,code{background:#f0f1f5;border-radius:6px;padding:2px 5px}.signature{margin-top:16px;padding-top:12px;border-top:1px dashed var(--line);color:var(--muted);font-style:italic}.tags{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}.tags a,.tag-cloud a{background:#eff0f8;color:#4e5997;text-decoration:none;padding:5px 9px;border-radius:8px;font-size:13px}.tag-cloud{display:flex;flex-wrap:wrap;gap:10px}.tag-cloud a{font-size:16px;padding:10px 13px}.actions{display:flex;align-items:center;gap:14px;padding-top:12px;border-top:1px solid var(--line);font-size:13px}.actions form{margin:0}.actions a,.link{color:var(--muted);background:none;border:0;padding:0;text-decoration:none;font:inherit;cursor:pointer}.best{border:2px solid var(--mint);position:relative}.best:before{content:'Лучший ответ';position:absolute;right:16px;top:-12px;background:var(--mint);padding:3px 10px;border-radius:99px;font-size:12px;font-weight:700}form{display:flex;flex-direction:column;gap:14px}input,textarea,select,button{font:inherit}input,textarea,select{width:100%;border:1px solid #d8dae3;background:#fff;border-radius:11px;padding:12px;color:var(--ink);font-size:16px}textarea{min-height:110px;resize:vertical}input:focus,textarea:focus{outline:3px solid #6672b322;border-color:var(--brand)}label{display:flex;flex-direction:column;gap:6px;font-weight:600}.check{flex-direction:row;align-items:center}.check input{width:auto}.primary,button{border:0;border-radius:11px;padding:12px 17px;background:#e8e9ee;color:var(--ink);cursor:pointer;font-weight:700}.primary{background:var(--brand);color:#fff;text-decoration:none;text-align:center}.primary:hover{background:var(--brand2)}.big{min-height:54px}.danger{color:var(--danger)!important}.toolbar{display:flex;align-items:center;gap:6px;background:#f2f3f6;border-radius:10px;padding:6px}.toolbar button{padding:5px 9px}.toolbar span{font-size:12px;color:var(--muted);margin-left:auto}.editor{margin:20px 0}.credentials,.announcement,.flash{padding:16px 19px;border-radius:14px;margin:16px 0}.credentials{background:#fff5ce;border:1px solid #f0d676}.credentials code{display:block;font-size:17px;padding:12px;margin:10px 0;background:#fff}.announcement{background:#e8eafb}.flash.ok{background:#dff8ec;color:#176446}.flash.error{background:#ffe2e4;color:#8d2730}.narrow{max-width:470px;margin:50px auto}.grid,.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}.product{margin:0}.metric{background:#fff;border-radius:16px;padding:20px;display:flex;flex-direction:column;box-shadow:var(--shadow)}.metric b{font-size:30px;color:var(--brand)}.metric span{color:var(--muted)}.table{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:12px;border-bottom:1px solid var(--line);vertical-align:top}.plus{color:#148155;font-weight:700}.minus{color:var(--danger)}.row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px}.notice{display:block;color:var(--ink);text-decoration:none}.tabs{display:flex;gap:8px;overflow:auto}.tabs a{padding:9px 13px;background:#fff;border-radius:10px;text-decoration:none;color:var(--brand)}.chat,.admin{display:grid;grid-template-columns:220px 1fr;gap:20px}.chat aside,.admin aside{display:flex;flex-direction:column;gap:4px;background:#fff;padding:14px;border-radius:16px;height:max-content;position:sticky;top:82px}.chat aside a,.admin aside a{padding:10px;border-radius:9px;text-decoration:none;color:var(--ink)}.chat aside a:hover,.admin aside a:hover{background:#eff0f8}.bubble{width:80%;background:#fff;padding:13px;border-radius:14px;margin:8px 0}.bubble.mine{margin-left:auto;background:#e9ebfa}.message-form{position:sticky;bottom:8px;background:var(--bg);padding-top:10px}.empty{text-align:center;color:var(--muted);padding:40px}.profile-head{display:flex;align-items:center;gap:16px}.search{display:flex;flex-direction:row}.search input{flex:1}.pager{text-align:center;margin:25px}footer{text-align:center;color:var(--muted);margin-top:55px}.modal{position:fixed;inset:0;background:#20233c88;display:grid;place-items:center;z-index:40;padding:16px}.modal .card{width:min(600px,100%);max-height:90vh;overflow:auto}#toasts{position:fixed;right:16px;bottom:16px;z-index:50;display:grid;gap:8px}.toast{background:#262a42;color:#fff;padding:13px 16px;border-radius:12px;box-shadow:var(--shadow);animation:pop .2s ease-out}.new-item{animation:pop .25s ease-out}@keyframes pop{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@media(max-width:760px){.top{align-items:flex-start;flex-direction:column}.top nav{width:100%}.top nav a{padding:8px 7px;font-size:13px}.wrap{width:94%;margin-top:14px}.card{padding:16px}.hero{padding:27px 20px}.hero h1{font-size:42px}.chat,.admin{grid-template-columns:1fr}.chat aside,.admin aside{position:static;flex-direction:row;overflow:auto}.bubble{width:92%}.row{align-items:stretch;flex-direction:column}.search{position:relative}.metrics{grid-template-columns:1fr 1fr}.toolbar span{display:none}h1{font-size:27px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.attachments{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0;padding:10px;background:#f6f7fb;border-radius:10px}.attachments>b{width:100%}.attachments span{display:flex;align-items:center;gap:5px}.attachments form{display:inline}.attachments a{color:var(--brand2);text-decoration:none}.actions{flex-wrap:wrap}.actions details{position:relative}.actions summary{cursor:pointer;color:var(--muted)}.mini-form{position:absolute;z-index:8;min-width:260px;background:#fff;padding:12px;border-radius:12px;box-shadow:var(--shadow)}.pin-box{margin-top:12px;background:#f6f7fb;padding:10px;border-radius:10px}.pin-box summary{cursor:pointer;font-weight:700}.pin-box form{display:flex;flex-direction:row;margin-top:8px}.comment-depth{margin-left:min(6vw,44px);border-left:2px solid #e7e9f3;padding-left:10px}.comment-depth.depth-0{margin-left:0}.profile-stats{display:flex;flex-wrap:wrap;gap:8px}.profile-stats span{background:#eff0f8;padding:5px 9px;border-radius:8px;font-size:13px}.editor-preview{border:1px dashed #b8bdd7;border-radius:11px;padding:14px;background:#fafaff;min-height:80px}.latex{display:inline-flex;align-items:center;gap:2px;font-family:Georgia,"Times New Roman",serif;font-style:italic;background:#f8f8fc;border-radius:5px;padding:1px 4px}.latex-block{display:flex;justify-content:center;margin:12px 0;padding:10px}.fraction{display:inline-flex;flex-direction:column;text-align:center;vertical-align:middle}.fraction>span:first-child{border-bottom:1px solid currentColor}.radicand{border-top:1px solid currentColor}.incoming{animation:liveIn .3s ease-out}.updated{animation:liveUpdate 1.1s ease-out}@keyframes liveIn{from{opacity:0;transform:translateY(-14px)}}@keyframes liveUpdate{0%,100%{box-shadow:var(--shadow)}35%{box-shadow:0 0 0 4px rgba(112,224,172,.55)}}#toasts a{text-decoration:none}.toast{display:block}.toolbar{flex-wrap:wrap}.toolbar button{min-width:40px;min-height:36px}@media(max-width:760px){.mini-form{position:fixed;left:4%;right:4%;bottom:12px;min-width:0}.comment-depth{margin-left:12px}.pin-box form{flex-direction:column}.attachments span{width:100%;justify-content:space-between}.actions{gap:12px}}
.top nav a{min-height:44px;display:flex;align-items:center}.top nav{scrollbar-width:none}.top nav::-webkit-scrollbar{display:none}.filter-bar{display:grid;grid-template-columns:minmax(180px,2fr) repeat(3,minmax(120px,1fr));align-items:end}.md-list-item{display:block;padding-left:8px}.md-list-item.numbered{display:flex;align-items:baseline;gap:.4em}.md-list-index{flex:0 0 auto;min-width:1.8em;font-weight:700;font-variant-numeric:tabular-nums;text-align:right}.md-list-body{min-width:0}@media(max-width:760px){.filter-bar{grid-template-columns:1fr}.top nav a{min-height:44px}}
/* UX/AJAX rework — 2026-09-12 */
a{color:#5360a2;text-decoration-thickness:1.5px;text-underline-offset:3px;text-decoration-color:#aeb4dd;transition:color .15s ease,text-decoration-color .15s ease}a:hover{color:#394583;text-decoration-color:currentColor}.top .points,.top .points:hover{color:#fff!important;background:var(--mint)!important;font-weight:800;box-shadow:none;transform:none}.reward{color:#fff;background:#38b982;font-weight:800}.avatar{overflow:hidden;flex:0 0 auto}.avatar img{width:100%;height:100%;object-fit:cover}.avatar.mini{width:34px;height:34px;border-radius:10px}.form-shell{margin:16px 0}.form-toggle{min-height:46px}.collapsible-form[hidden]{display:none}.collapsible-form{transform-origin:top;animation:formOpen .2s ease-out}@keyframes formOpen{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:none}}.rich-toolbar{display:flex;flex-wrap:wrap;gap:5px;padding:7px;background:#f0f1f7;border:1px solid #e1e3ef;border-radius:12px}.rich-toolbar button{min-width:40px;min-height:38px;padding:7px 9px;background:#fff;border:1px solid #dfe2ec;box-shadow:0 1px 2px #2a315514}.rich-toolbar button:hover{border-color:var(--brand);color:var(--brand)}.reward-field{display:flex;align-items:flex-end;gap:16px;padding:12px 14px;background:#edfbf5;border-radius:12px}.reward-field label{min-width:96px}.reward-field .reward-input{width:96px}.reward-field p{margin:0;color:#18805b;font-weight:700}.dropzone{position:relative;display:grid;place-items:center;text-align:center;gap:4px;border:2px dashed #b9bfdc;background:#fafaff;padding:20px;border-radius:14px;cursor:pointer;font-weight:400}.dropzone input{position:absolute;inset:0;opacity:0;cursor:pointer}.dropzone-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#e9ebf8;color:var(--brand);font-size:26px}.dropzone small{font-size:13px}.dropzone.dragover{border-color:var(--mint);background:#edfbf5}.dropzone.invalid{border-color:var(--danger);background:#fff5f5}.file-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.file-list>span{background:#fff;border:1px solid var(--line);padding:5px 8px;border-radius:8px;font-size:12px}.form-error{color:#a52e38;background:#fff0f1;border-radius:9px;padding:8px 10px;font-size:14px}.form-error:empty{display:none}.spinner{display:inline-block;width:17px;height:17px;border:2px solid #ffffff66;border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;vertical-align:-3px;margin-right:7px}@keyframes spin{to{transform:rotate(360deg)}}.question-open{display:inline-flex;margin-top:0;font-weight:700;text-decoration:none}.attachments{display:grid;gap:10px;background:transparent;padding:0}.attachment-image{position:relative;margin:12px 0}.attachment-image img{display:block;width:auto;height:auto;max-width:100%;border-radius:12px;background:#f1f2f6}.attachment-image figcaption{color:var(--muted);font-size:12px;margin-top:5px}.attachment-image form{position:absolute;right:8px;top:8px}.attachment-file{display:flex;align-items:center;gap:10px;padding:11px 12px;background:#f5f6fa;border:1px solid #e5e7ef;border-radius:12px}.attachment-file>div{min-width:0;flex:1}.attachment-file b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#e4e7f7;color:var(--brand);font-weight:900}.download-link{font-weight:700;text-decoration:none}.icon-btn{width:32px;height:32px;min-height:0;padding:0;border-radius:9px;background:#fff;box-shadow:0 2px 8px #0002}.like-button{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:7px 11px;border:1px solid #e1e3eb;background:#fff;border-radius:999px;color:#777b8e}.like-button span{font-size:19px;line-height:1}.like-button.liked{color:#fff;background:#d95167;border-color:#d95167;box-shadow:0 4px 12px #d9516740}.comment-card{padding:12px 14px;margin:8px 0;border-radius:12px;box-shadow:0 3px 14px rgba(48,52,82,.055)}.comment-card .avatar{width:34px;height:34px;border-radius:10px}.comment-card .prose{font-size:15px;margin-top:7px}.comment-card .actions{padding-top:7px;gap:10px}.comment-depth{padding-left:9px;margin-left:min(3vw,24px)}.modal{backdrop-filter:blur(3px)}.modal-box{position:relative;width:min(560px,100%);margin:0;animation:modalIn .2s ease-out}@keyframes modalIn{from{opacity:0;transform:scale(.97) translateY(8px)}}.modal-x{position:absolute;right:12px;top:12px;width:38px;height:38px;padding:0;border-radius:50%;font-size:24px}.modal-icon.warning{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#fff0d5;color:#9d6200;font-size:28px;font-weight:900}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.danger-solid{background:var(--danger);color:#fff}.formula-presets{display:flex;flex-wrap:wrap;gap:7px}.formula-presets button{background:#eff1fa;color:#424e91}.current-attachments{display:grid;gap:6px}.attachment-remove{font-weight:400;display:flex;flex-direction:row;align-items:center}.attachment-remove input{width:auto}.content-card.removing{opacity:0;transform:scale(.98);transition:.2s}.audit-list{display:grid;gap:12px}.audit-entry{margin:0}.audit-entry header{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.audit-entry header time{margin-left:auto;color:var(--muted);font-size:13px}.audit-diff{display:grid;gap:8px;margin-top:12px}.audit-diff>div{display:grid;grid-template-columns:minmax(90px,140px) 1fr 1fr;gap:8px;align-items:start}.audit-diff del,.audit-diff ins{display:block;padding:8px;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere;text-decoration:none}.audit-diff del{background:#fff0f1;color:#8a3038}.audit-diff ins{background:#eafaf3;color:#176847}.muted{color:var(--muted)}.user-cell{display:flex;align-items:center;gap:9px;text-decoration:none}
@media(max-width:760px){.reward-field{align-items:flex-start;flex-direction:column;gap:8px}.rich-toolbar{overflow-x:auto;flex-wrap:nowrap}.rich-toolbar button{flex:0 0 auto}.attachment-file{align-items:flex-start;flex-wrap:wrap}.attachment-file .download-link{margin-left:48px}.audit-diff>div{grid-template-columns:1fr}.audit-entry header time{width:100%;margin-left:0}.modal-actions>*{flex:1}.comment-depth{margin-left:8px}.comment-card{padding:11px}.top{gap:4px}.top nav{order:2}.form-toggle{width:100%}}
/* Profile, account header, dialogs and leaders — 2026-09-12 */
.top{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"logo nav account";gap:12px}.top>.logo{grid-area:logo}.top>nav{grid-area:nav;justify-content:flex-end}.account-strip{grid-area:account;display:flex;align-items:center;gap:8px;white-space:nowrap}.header-profile{display:flex;align-items:center;gap:7px;color:#fff;text-decoration:none;font-weight:700;padding:4px 5px;border-radius:10px}.header-profile:hover{background:#ffffff12}.top .points{order:2;color:#fff!important;background:var(--mint);font-weight:800;padding:8px 11px;border-radius:999px;text-decoration:none;box-shadow:none;transform:none}.top .points:hover{color:#fff!important;background:var(--mint)!important;box-shadow:none!important;transform:none!important}.icon-link{position:relative;justify-content:center;min-width:44px;font-size:19px}.icon-link i{position:absolute;right:1px;top:2px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--mint);color:#173e30;font-size:10px;font-style:normal;line-height:17px;text-align:center}.avatar.mini{width:32px;height:32px;border-radius:10px;font-size:13px}.avatar.has-photo{overflow:hidden;background:#e8eafb}.avatar img{display:block;width:100%;height:100%;object-fit:cover}.compact{display:inline-flex;width:auto;min-height:42px;align-items:center;justify-content:center;padding:9px 14px}.secondary{display:inline-flex;background:#eef0f8;color:var(--brand2);border-radius:11px;text-decoration:none;font-weight:700;padding:10px 15px}.profile-actions,.profile-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.profile-title-row h1{margin-right:auto}.settings-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px}.settings-heading>a{margin-bottom:8px}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.settings-grid>.card{margin:0}.profile-setting-form h2{margin-top:0}.setting-help{margin:0;color:var(--muted);font-size:14px;font-weight:400}.success-copy{color:#177451}.avatar-setting-preview{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:14px}.form-status{min-height:20px;font-size:14px;color:var(--muted)}.form-status.ok{color:#177451;font-weight:700}.verified-badge{display:inline-flex;align-items:center;gap:5px;color:#177451;font-weight:700}.leaders-head{display:flex;align-items:end;justify-content:space-between}.eyebrow.dark{color:var(--brand2)}.leaders-tabs{margin:18px 0}.leaders-tabs a.active{background:var(--brand);color:#fff}.leader-list{display:grid;gap:10px}.leader-row{display:grid;grid-template-columns:42px 52px minmax(0,1fr) auto;align-items:center;gap:14px;margin:0;color:var(--ink);text-decoration:none;transition:transform .15s ease-out,box-shadow .15s ease-out}.leader-row:hover{transform:translateY(-1px);box-shadow:0 10px 32px rgba(48,52,82,.13)}.leader-place{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:#eff0f8;color:var(--brand2);font-weight:800}.leader-row:nth-child(1) .leader-place{background:#fff2b8;color:#7e5f00}.leader-row:nth-child(2) .leader-place{background:#edf0f4;color:#59606c}.leader-row:nth-child(3) .leader-place{background:#f5dfd1;color:#805335}.avatar.leader-avatar{width:52px;height:52px;border-radius:16px}.leader-person{display:flex;flex-direction:column;min-width:0}.leader-person b{font-size:17px;overflow:hidden;text-overflow:ellipsis}.leader-person small{color:var(--muted)}.leader-points{color:#177451;font-size:19px}.leader-points small{font-size:12px;color:var(--muted);font-weight:600}.conversation-list{display:grid;gap:4px}.conversation-link{display:flex!important;align-items:center;gap:10px}.conversation-link>span:last-child{display:flex;flex-direction:column;min-width:0}.conversation-link small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-link.active{background:#e9ebfa!important;color:var(--brand2)!important}.avatar.chat-avatar{width:38px;height:38px;border-radius:12px;flex:0 0 38px}.chat-peer{display:flex;align-items:center;gap:10px;background:#fff;border-radius:14px;padding:11px 14px;margin-bottom:12px}.chat-peer>div{display:flex;flex-direction:column}.chat-peer a{text-decoration:none;color:var(--ink)}.message-list{max-height:58vh;overflow:auto;padding:0 4px;scroll-behavior:smooth}
@media(max-width:760px){.top{grid-template-columns:auto 1fr;grid-template-areas:"logo account" "nav nav";align-items:center}.top>.logo{align-self:center}.account-strip{justify-self:end}.top>nav{width:100%;justify-content:flex-start}.header-profile span:last-child{max-width:90px;overflow:hidden;text-overflow:ellipsis}.top .points{padding:7px 9px}.settings-heading{align-items:flex-start;flex-direction:column;gap:2px}.settings-grid{grid-template-columns:1fr}.profile-head{align-items:flex-start}.profile-title-row{align-items:flex-start;flex-direction:column}.leader-row{grid-template-columns:34px 44px minmax(0,1fr);gap:9px;padding:13px}.avatar.leader-avatar{width:44px;height:44px;border-radius:14px}.leader-points{grid-column:3;font-size:17px}.chat aside{display:block}.conversation-list{display:flex;overflow-x:auto;gap:8px}.conversation-link{min-width:190px}.message-list{max-height:48vh}}

/* Compact comment threads — 2026-09-12 */
.comment-depth{margin-left:18px;padding-left:10px;border-left:2px solid #e2e5f0}
.comment-depth.depth-0{margin-left:0}
.comment-card{margin:5px 0;padding:9px 11px;border:1px solid #e8e9ef;border-radius:10px;box-shadow:none}
.comment-card .author{gap:7px}
.comment-card .avatar{width:28px;height:28px;border-radius:8px;font-size:11px}
.comment-card .author>div{min-width:0;display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:6px}
.comment-card .author b{font-size:13px;line-height:1.2}
.comment-card .author .online{font-size:10px}
.comment-card .author small{grid-column:1/-1;font-size:10px;line-height:1.25;margin-top:1px}
.comment-card .prose{margin:5px 0 0;font-size:14px;line-height:1.4}
.comment-card .prose p{margin:0 0 5px}
.comment-card .prose p:last-child{margin-bottom:0}
.comment-card .attachments{margin:7px 0}
.comment-card .actions{gap:8px;margin-top:6px;padding-top:5px;border-top:1px solid #f0f1f5;font-size:11px}
.comment-card .like-button{min-height:28px;padding:3px 8px;gap:4px;font-size:11px}
.comment-card .like-button span{font-size:14px}
.form-shell--comment{margin:3px 0 7px 11px}
.form-shell--comment>.form-toggle{width:auto;min-height:30px;padding:4px 9px;background:transparent;color:var(--brand2);font-size:12px;font-weight:700}
.form-shell--comment>.form-toggle:hover{background:#eef0f8}
.form-shell--comment>.collapsible-form{margin:5px 0 8px;padding:11px}
@media(max-width:760px){.comment-depth{margin-left:7px;padding-left:7px}.comment-card{padding:8px 9px}.comment-card .actions{gap:7px}.form-shell--comment{margin-left:5px}.form-shell--comment>.form-toggle{width:auto}}

/* Question list/detail composition */
.attachment-badge{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.attachment-badge span{display:inline-flex;align-items:center;min-height:32px;padding:5px 9px;border-radius:9px;background:#f0f2f8;color:var(--brand2);font-size:13px;font-weight:700}.answer-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:9px 11px;border-radius:12px;background:#f7f8fb}.answer-count{color:var(--brand2);font-size:13px;font-weight:800}.answer-authors{display:flex;align-items:center}.answer-authors a{display:block;margin-left:-7px;border:2px solid #fff;border-radius:11px}.answer-authors a:first-child{margin-left:0}.avatar.answer-avatar{width:30px;height:30px;border-radius:9px;font-size:11px}.avatar-overflow{display:grid;place-items:center;width:30px;height:30px;margin-left:-6px;border:2px solid #fff;border-radius:10px;background:var(--brand);color:#fff;font-size:11px;font-weight:800}.detail-card>.question-open{display:none}.comments-panel{margin:16px -4px -4px;padding:12px;border-top:1px solid var(--line);border-radius:0 0 13px 13px;background:#f8f9fc}.comments-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;color:var(--muted);font-size:13px}.comments-list{display:grid;gap:7px}.comments-panel .content-card{margin:0;padding:12px 13px;border:1px solid #e6e8f0;box-shadow:none;background:#fff}.comments-panel .comments-panel{margin:10px 0 0;padding:9px 0 0 12px;background:transparent;border-radius:0;border-left:2px solid #e2e5f1}.comments-panel .form-shell--comment{margin:8px 0 0}.comment-toggle{display:inline-flex;align-items:center;width:auto;min-height:44px;padding:8px 13px;background:#eef0f8;color:var(--brand2);font-size:13px}.comment-toggle:before{content:'↩';margin-right:6px}.form-shell--comment .editor{margin:8px 0 0;padding:13px}.compose-cta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;margin:22px 0;padding:18px;border:1px solid #d8dcf3;border-radius:18px;background:linear-gradient(135deg,#f0f2ff,#e9fbf4);box-shadow:var(--shadow)}.compose-cta-copy{display:flex;align-items:center;gap:13px}.compose-cta-copy>div{display:flex;flex-direction:column}.compose-cta-copy b{font-size:17px}.compose-cta-copy small{color:var(--muted)}.compose-cta-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:14px;background:var(--brand);color:#fff;font-size:24px;font-weight:900}.compose-cta .form-toggle{width:auto;min-width:150px}.compose-cta .collapsible-form{grid-column:1/-1;width:100%;margin:0}.answer-note{display:flex;flex-direction:column;gap:3px;border-left:4px solid #b8bdd8}.answer-note span{color:var(--muted)}.viewer-list{display:grid;gap:8px}.viewer-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:12px}.viewer-row small{color:var(--muted)}.viewer-row strong{display:grid;place-items:center;min-width:34px;height:34px;border-radius:11px;background:#eff1fa;color:var(--brand2)}.view-count{border:0;background:none;padding:0;color:inherit;font:inherit;cursor:pointer}[data-track-view]{scroll-margin-top:90px}
@media(max-width:760px){.compose-cta{grid-template-columns:1fr;padding:15px}.compose-cta .form-toggle{width:100%}.compose-cta-copy b{font-size:16px}.answer-summary{align-items:flex-start;flex-direction:column}.comments-panel{margin-left:-7px;margin-right:-7px;padding:10px 8px}.comments-panel .content-card{padding:11px}.comments-panel .comments-panel{padding-left:8px}.viewer-row{grid-template-columns:34px minmax(0,1fr) auto}}
.comments-panel .form-shell--comment>.form-toggle{min-height:44px;padding:8px 13px;background:#eef0f8;color:var(--brand2);font-size:13px}

/* Keep online status inline with the login in every content card. */
.content-card .author>div{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:6px}
.content-card .author>div>b{grid-column:1;min-width:0;line-height:1.25}
.content-card .author>div>.online{grid-column:2;margin-left:0;white-space:nowrap;justify-self:start;line-height:1.25}
.content-card .author>div>small{grid-column:1/-1}

/* Two-level comment threads and compact reply affordance — 2026-09-12 */
.comment-reply-to{display:inline-flex;align-items:center;gap:4px;margin:5px 0 0;color:var(--brand2);font-size:11px;font-weight:700;text-decoration:none}
.comment-reply-to:hover{text-decoration:underline}
.comments-panel--reply-only{margin:4px 0 0!important;padding:0!important;border:0!important;background:transparent!important}
.comments-panel .comments-panel:not(.comments-panel--reply-only){margin-left:12px;padding-left:9px}
.comments-panel .form-shell--comment{margin:4px 0 0}
.comments-panel .comment-toggle,.comments-panel .form-shell--comment>.form-toggle{min-height:34px;padding:4px 9px;border-radius:9px;background:transparent;color:var(--brand2);font-size:11px}
.comments-panel .comment-toggle:before{margin-right:4px;font-size:12px}
.comments-panel .comment-toggle:hover,.comments-panel .form-shell--comment>.form-toggle:hover{background:#eef0f8}
@media(max-width:760px){.comments-panel .comments-panel:not(.comments-panel--reply-only){margin-left:6px;padding-left:7px}.comments-panel .comment-toggle,.comments-panel .form-shell--comment>.form-toggle{min-height:36px}}
/* Compact visually, but keep a safe touch target. */
.comments-panel .comment-toggle,.comments-panel .form-shell--comment>.form-toggle{min-height:40px;padding:3px 9px}
@media(max-width:760px){.comments-panel .comment-toggle,.comments-panel .form-shell--comment>.form-toggle{min-height:40px}}

.back-to-questions{align-self:flex-start;display:inline-flex;align-items:center;margin-bottom:12px;padding:7px 14px;border-radius:10px;background:#eef0fa;color:var(--brand2);font-size:14px;font-weight:700;text-decoration:none;transition:background .15s ease,color .15s ease}.back-to-questions:hover{background:#e2e5f4;color:var(--brand)}

/* Softer content cards: hierarchy through space and surfaces, not rules. */
.content-card{border:0;box-shadow:0 7px 24px rgba(48,52,82,.075)}
.content-card a{text-decoration:none}
.content-card a:hover{color:var(--brand2)}
.content-card .author a{color:var(--ink);font-weight:800}
.content-card .author a:hover{color:var(--brand)}
.content-card .actions{gap:5px;margin-top:12px;padding-top:0;border-top:0}
.content-card .actions>a,.content-card .actions>.link{display:inline-flex;align-items:center;min-height:32px;padding:5px 8px;border-radius:8px;color:var(--muted);text-decoration:none}
.content-card .actions>a:hover,.content-card .actions>.link:hover{background:#f0f2f7;color:var(--brand2)}
.content-card .like-button{border:0;background:#f0f2f7;box-shadow:none}
.content-card .question-open{align-items:center;width:max-content;padding:7px 11px;border-radius:10px;background:#eef0fa;color:var(--brand2);text-decoration:none}
.content-card .signature{margin-top:13px;padding:10px 12px;border-top:0;border-radius:10px;background:#f7f8fb}
.best{border:0;background:linear-gradient(180deg,#f5fffacc 0,#fff 90px);box-shadow:0 8px 26px rgba(54,137,99,.13)}
.comments-panel{margin:14px 0 0;padding:10px;border:0;border-radius:14px;background:#f5f6fa}
.comments-panel .content-card{border:0;background:#fff;box-shadow:0 2px 9px rgba(48,52,82,.055)}
.comments-panel .comments-panel:not(.comments-panel--reply-only){margin:7px 0 0 10px;padding:7px 0 0 8px;border:0;border-radius:11px;background:#eef0f6}
.comment-card{border:0!important;box-shadow:0 2px 8px rgba(48,52,82,.05)!important}
.comment-card .actions{margin-top:5px;padding-top:0;border-top:0}
.comment-depth{border-left:0}
.comment-reply-to{padding:3px 7px;border-radius:7px;background:#eef0f8;color:var(--brand2);text-decoration:none}
.view-count{text-decoration:none!important}
.answer-note{border-left:0;background:#eef0f8}
.answer-note-avg{display:block;margin-top:6px;padding-top:6px;border-top:1px solid rgba(48,52,82,.08);font-size:13px;font-weight:600;color:var(--brand2)}
@media(max-width:760px){.content-card{box-shadow:0 5px 18px rgba(48,52,82,.065)}.comments-panel{margin-left:0;margin-right:0;padding:8px}.comments-panel .comments-panel:not(.comments-panel--reply-only){margin-left:5px;padding-left:6px}.content-card .actions{gap:3px}.content-card .actions>a,.content-card .actions>.link{padding:5px 6px;font-size:11px}}

/* Restore expressive active likes and give card copy more breathing room. */
.content-card>.prose{margin-top:16px;margin-bottom:16px;overflow-x:auto;overflow-y:clip}
.content-card .like-button.liked{background:#d95167;color:#fff;box-shadow:0 4px 12px rgba(217,81,103,.28)}
.comment-card>.prose{margin-top:9px;margin-bottom:9px;overflow-x:auto;overflow-y:clip}

/* Quote sits in the paragraph rhythm: brand bar, soft fill, tight vertical space. */
blockquote{margin:4px 0;padding:5px 12px 5px 13px;border:0;border-left:3px solid var(--brand);border-radius:0 10px 10px 0;background:#f3f5fb;color:#313652}
blockquote br:last-child{display:none}
blockquote+br{display:none}
blockquote:first-child{margin-top:0}
blockquote:last-child{margin-bottom:0}
blockquote:has(+ br + blockquote){margin-bottom:0;padding-bottom:1px;border-bottom-right-radius:0}
blockquote+br+blockquote{margin-top:0;padding-top:1px;border-top-right-radius:0}

/* Header identity hover: keep white text and use a soft glass highlight. */
.top .logo,.top .header-profile{transition:background-color .18s ease,box-shadow .18s ease,transform .18s ease,color .18s ease}
.top .logo{padding:5px 8px;border-radius:12px}
.top .logo:hover,.top .logo:focus-visible{color:#fff;background:rgba(255,255,255,.11);box-shadow:0 5px 16px rgba(39,45,91,.18);transform:translateY(-1px);text-decoration:none}
.top .header-profile:hover,.top .header-profile:focus-visible{color:#fff;background:rgba(255,255,255,.13);box-shadow:0 5px 16px rgba(39,45,91,.16);transform:translateY(-1px);text-decoration:none}
.top .logo:hover span{transform:rotate(-7deg) scale(1.05)}
.top .logo span{transition:transform .18s ease}
@media(prefers-reduced-motion:reduce){.top .logo,.top .header-profile,.top .logo span{transition:none}.top .logo:hover,.top .header-profile:hover{transform:none}}

/* Standalone question pinning block. */
.pin-promo{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(260px,auto);align-items:center;gap:15px;margin:-3px 0 22px;padding:16px 18px;border-radius:18px;background:linear-gradient(135deg,#fff5dd 0,#f2efff 58%,#eafbf4 100%);box-shadow:0 7px 22px rgba(74,67,117,.09)}
.pin-promo-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;background:#fff;color:#8c6122;font-size:24px;box-shadow:0 4px 13px rgba(105,77,31,.11)}
.pin-promo-copy{display:flex;flex-direction:column;min-width:0;gap:3px}
.pin-promo-copy b{font-size:16px}
.pin-promo-copy small{max-width:46ch;color:var(--muted);line-height:1.35}
.pin-current{width:max-content;margin-top:4px;padding:3px 7px;border-radius:7px;background:#fff8;color:#6f568f;font-size:11px;font-weight:800}
.pin-promo-form{display:grid;grid-template-columns:minmax(150px,1fr) auto;align-items:end;gap:8px;margin:0}
.pin-promo-form label{gap:3px;color:var(--muted);font-size:11px}
.pin-promo-form select{min-width:170px;padding:9px 11px;background:#fff;border:0;box-shadow:0 2px 9px rgba(67,64,100,.08)}
.pin-promo-form button{min-height:42px;white-space:nowrap}
.pin-promo-form .form-error{grid-column:1/-1}
.pin-promo--active{grid-template-columns:auto minmax(0,1fr) auto;background:linear-gradient(135deg,#e8faf0 0,#eef0ff 58%,#f5f0ff 100%)}
.pin-promo--active .pin-promo-copy b{color:#38b982}
.pin-promo--active .pin-promo-icon{color:#38b982;box-shadow:0 4px 13px rgba(56,185,130,.15)}
.pin-until-date{color:#6f568f}
.pin-unpin-form{display:flex;align-items:center;margin:0}
.pin-unpin-form button{min-height:38px;padding:8px 16px;border-radius:10px;background:transparent;color:var(--brand2);border:1px solid #c0c5e0;font-weight:700;font-size:13px;white-space:nowrap;box-shadow:none;transition:background .15s,color .15s,border-color .15s}
.pin-unpin-form button:hover{background:#f2f3fa;border-color:var(--brand);color:var(--brand2)}
.pin-unpin-form .form-error{margin-right:8px}
@media(max-width:760px){.pin-promo{grid-template-columns:auto 1fr;gap:10px;margin-top:-4px;padding:14px}.pin-promo-icon{width:40px;height:40px;border-radius:13px;font-size:21px}.pin-promo-form{grid-column:1/-1;grid-template-columns:1fr}.pin-promo-form select{min-width:0}.pin-promo-form button{width:100%}.pin-unpin-form{grid-column:1/-1}}
.pin-promo-post{grid-template-columns:auto minmax(0,1fr) auto}
.pin-promo-post form{display:flex;align-items:center;margin:0}
.pin-promo-post form button.primary{min-height:42px;white-space:nowrap}

/* Pinned posts on public profile */
.pinned-posts-section{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}
.pinned-post-card{position:relative;overflow:hidden;border:1.5px solid rgba(99,102,241,.18);border-radius:18px;background:linear-gradient(135deg,#f5f3ff 0%,#eef4ff 40%,#f0fdf8 100%);box-shadow:0 6px 24px rgba(99,102,241,.08),inset 0 1px 0 rgba(255,255,255,.8);transition:box-shadow .2s}
.pinned-post-card:hover{box-shadow:0 8px 32px rgba(99,102,241,.13),inset 0 1px 0 rgba(255,255,255,.8)}
.pinned-post-badge{display:inline-flex;align-items:center;gap:6px;margin-bottom:10px;padding:4px 12px 4px 8px;border-radius:20px;background:linear-gradient(135deg,#6366f1,#818cf8);color:#fff;font-size:12px;font-weight:700;letter-spacing:.3px;width:max-content}
.pinned-post-badge-icon{font-size:14px}
.pinned-post-author{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.pinned-post-author b a{color:var(--text);text-decoration:none}
.pinned-post-author b a:hover{color:var(--brand)}
.pinned-post-author small{color:var(--muted);font-size:12px}
.pinned-post-card .prose{margin-bottom:12px}
.pinned-post-card .tags{margin-bottom:10px}
.pinned-post-link{display:inline-flex;align-items:center;gap:4px;color:var(--brand);font-weight:600;font-size:14px;text-decoration:none}
.pinned-post-link:hover{text-decoration:underline}

/* Question filters and numbered pagination. */
.questions-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:28px 0 12px;position:relative}
.questions-heading>div{display:flex;align-items:baseline;gap:9px}
.questions-heading h2{margin:0;font-size:24px}
.questions-heading>div>span{color:var(--muted);font-size:12px}
.question-filters{position:relative}
.question-filters>summary{display:flex;align-items:center;gap:7px;min-height:42px;padding:8px 13px;border-radius:11px;background:#fff;color:var(--brand2);box-shadow:0 4px 15px rgba(48,52,82,.07);cursor:pointer;font-weight:800;list-style:none}
.question-filters>summary::-webkit-details-marker{display:none}
.question-filters>summary:before{content:'⚙';font-size:15px}
.question-filters>summary i{display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:var(--mint);color:#174f39;font-size:10px;font-style:normal}
.filters-panel{position:absolute;right:0;top:50px;z-index:15;width:min(680px,92vw);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:16px;border-radius:18px;background:#fff;box-shadow:0 18px 48px rgba(38,43,76,.18)}
.filter-section{grid-column:1/-1}
.filter-section>b{display:block;margin-bottom:7px}
.filter-section-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px;margin-bottom:7px}
.filter-tag-mode{display:flex;align-items:center;gap:4px;padding:3px;border-radius:10px;background:#f1f2f7}
.filter-tag-mode label{cursor:pointer}
.filter-tag-mode input{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%)}
.filter-tag-mode span{display:block;padding:4px 8px;border-radius:7px;color:var(--muted);font-size:11px;font-weight:700}
.filter-tag-mode input:checked+span{background:#fff;color:var(--brand2);box-shadow:0 2px 7px rgba(48,52,82,.1)}
.filter-chips{display:flex;flex-wrap:wrap;gap:6px;max-height:150px;overflow:auto}
.filter-chip{display:block;font-weight:600;cursor:pointer}
.filter-chip input{position:absolute;opacity:0;pointer-events:none}
.filter-chip span{display:inline-flex;align-items:center;gap:4px;padding:6px 9px;border-radius:9px;background:#f1f2f7;color:var(--brand2);font-size:12px}
.filter-chip span small{display:inline;color:var(--muted);font-size:10px}
.filter-chip input:checked+span{background:var(--brand);color:#fff;box-shadow:0 3px 10px rgba(102,114,179,.24)}
.filter-chip input:checked+span small{color:#e9ebff}
.filter-check{align-self:end;min-height:47px;display:flex;flex-direction:row;align-items:center;gap:9px;padding:10px 12px;border-radius:11px;background:#f5f6fa}
.filter-check input{width:auto}
.filter-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:2px}
.filter-actions a{padding:9px;color:var(--muted);text-decoration:none}
.pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;margin:28px 0}
.page-number,.page-arrow,.page-gap{display:grid;place-items:center;min-width:40px;height:40px;padding:0 8px;border-radius:11px;text-decoration:none;font-weight:800}
.page-number,.page-arrow{background:#fff;color:var(--brand2);box-shadow:0 3px 12px rgba(48,52,82,.06)}
.page-number:hover,.page-arrow:hover{color:#fff;background:var(--brand);transform:translateY(-1px)}
.page-number.active{color:#fff;background:var(--brand);box-shadow:0 6px 16px rgba(102,114,179,.28)}
.page-gap{min-width:24px;color:var(--muted)}
@media(max-width:760px){.questions-heading{align-items:center}.questions-heading h2{font-size:22px}.questions-heading>div>span{display:none}.question-filters{position:static}.filters-panel{position:absolute;left:0;right:0;top:52px;width:100%;grid-template-columns:1fr;padding:13px}.filter-section,.filter-actions{grid-column:1}.question-filters>summary{min-height:40px}.page-number,.page-arrow,.page-gap{min-width:36px;height:36px;border-radius:10px}.pagination{gap:4px}}
.filter-chip input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.pagination .disabled{opacity:.38;box-shadow:none;cursor:default}
.pagination .disabled:hover{color:var(--brand2);background:#fff;transform:none}

/* Attachment image lightbox. */
.attachment-image .image-lightbox-trigger{display:block;width:max-content;max-width:100%;cursor:zoom-in;border-radius:12px}
.attachment-image .image-lightbox-trigger:hover img{filter:brightness(.94);transform:scale(.997)}
.attachment-image .image-lightbox-trigger img{transition:filter .16s ease,transform .16s ease}
.image-lightbox-modal{padding:18px;background:rgba(18,20,35,.88);backdrop-filter:blur(8px)}
.image-lightbox-box{width:min(1200px,96vw)!important;max-height:96vh!important;margin:0!important;padding:0!important;overflow:hidden!important;border-radius:18px!important;background:#181b2b!important;box-shadow:0 26px 80px rgba(0,0,0,.46)!important}
.image-lightbox{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;max-height:96vh}
.image-lightbox>img{display:block;width:100%;height:auto;max-height:calc(96vh - 70px);object-fit:contain;background:#11131f}
.image-lightbox-close{position:absolute;right:12px;top:12px;z-index:2;display:grid;place-items:center;width:42px;height:42px;padding:0;border-radius:50%;background:rgba(18,20,35,.72);color:#fff;font-size:28px;line-height:1;box-shadow:0 4px 16px rgba(0,0,0,.28)}
.image-lightbox-close:hover{background:#fff;color:#292d47}
.image-lightbox-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:62px;padding:10px 14px;color:#fff;background:#20243a}
.image-lightbox-bar>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}

/* Final card/header/filter polish. */
.reward{flex:0 0 auto;white-space:nowrap;background:#38b982;color:#fff}
.online{color:#38b982;font-weight:700}
.last-seen{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.best:before{color:#fff}
.icon-link i{background:#fff;color:var(--brand2);box-shadow:0 1px 4px rgba(31,35,67,.16)}
.top .logo,.top .logo:hover,.top .logo:focus-visible{background:transparent;box-shadow:none;transform:none}
.top .logo:hover span,.top .logo:focus-visible span{transform:none}
.top .header-profile:hover,.top .header-profile:focus-visible{transform:none}
.card-action-icon{justify-content:center!important;width:32px;min-width:32px;padding:5px!important;font-size:17px!important;line-height:1}
.filter-search{grid-column:1/-1}
.comments-panel .comments-panel:not(.comments-panel--reply-only){margin:8px 12px;padding:8px 12px}
@media(max-width:760px){.comments-panel .comments-panel:not(.comments-panel--reply-only){margin:8px;padding:8px}.card-action-icon{width:32px;min-width:32px;padding:5px!important}}
.image-lightbox-download{flex:0 0 auto;display:inline-flex;align-items:center;min-height:40px;padding:8px 13px;text-decoration:none}
@media(max-width:760px){.image-lightbox-modal{padding:8px}.image-lightbox-box{width:100%!important;max-height:98vh!important;border-radius:14px!important}.image-lightbox{max-height:98vh}.image-lightbox>img{max-height:calc(98vh - 62px)}.image-lightbox-bar{min-height:56px;padding:8px 10px}.image-lightbox-close{right:8px;top:8px;width:40px;height:40px}.image-lightbox-bar>span{font-size:11px}.image-lightbox-download{min-height:40px;padding:7px 10px;font-size:12px}}
.attachment-image .image-lightbox-trigger{width:100%;max-width:100%;overflow:hidden}
.attachment-image .image-lightbox-trigger>img{max-width:100%}

/* Cleaner comment controls and aggregate thread count. */
.comments-panel--nested .comments-head{display:none}
.comments-panel--nested.comments-panel--empty{display:none}
.comment-card .actions>.form-shell--comment{display:contents;margin:0}
.comment-card .actions>.form-shell--comment>.form-toggle{order:1;min-height:34px;padding:3px 9px}
.comment-card .actions>.like-form{order:0}
.comment-card .actions>.like-form .like-button{min-height:34px;padding:4px 9px}
.comment-card .actions>.form-shell--comment>.collapsible-form{order:20;flex:1 0 100%;width:100%;margin:6px 0 0}
.comment-card .actions>[data-report-type]{order:2}
.comment-card .actions>a,.comment-card .actions>form:not(.like-form),.comment-card .actions>.link{order:3}
.comments-head[hidden]{display:none!important}

/* Guided onboarding — 2026-09-13 */
.onboarding{margin:18px 0 24px;padding:24px;border:1px solid #d9deef;border-radius:22px;background:linear-gradient(145deg,#f7f8ff 0,#eefbf5 100%);box-shadow:0 10px 34px rgba(55,61,103,.10)}
.onboarding-head{display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:center;gap:24px;margin-bottom:20px}
.onboarding-head h2{margin:5px 0 6px;font-size:25px}.onboarding-head p{margin:0;color:var(--muted)}
.onboarding-progress{display:grid;gap:7px;text-align:right}.onboarding-progress strong{font-size:22px;color:var(--brand2)}.onboarding-progress>span{height:9px;overflow:hidden;border-radius:99px;background:#dfe3ee}.onboarding-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--brand),#38b982);transition:width .25s ease-out}
.onboarding-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.onboarding-card{display:grid;grid-template-columns:48px minmax(0,1fr);gap:13px;min-width:0;padding:18px;border-radius:17px;background:#fff;box-shadow:0 5px 18px rgba(48,52,82,.07)}.onboarding-card--wide{grid-column:1/-1}.onboarding-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#e9ecfb;color:var(--brand2);font-size:22px;font-weight:900}.onboarding-copy{min-width:0}.onboarding-title{display:flex;align-items:start;gap:8px}.onboarding-title h3{flex:1;margin:1px 0 5px;font-size:18px}.onboarding-title>b{padding:4px 8px;border-radius:99px;background:#dcf7eb;color:#176847;font-size:12px}.onboarding-card p{margin:0 0 13px;color:var(--muted);font-size:14px}.onboarding-card p strong{color:var(--ink)}
.onboarding-target{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0}.onboarding-target input{min-width:0;padding:10px 11px}.onboarding-target button{min-height:44px;padding:9px 13px;white-space:nowrap}.onboarding-email-forms{display:grid;grid-template-columns:1fr 1fr;gap:10px}.onboarding-skip{display:inline-flex;margin-top:8px}.onboarding-skip button{min-height:36px;color:var(--muted);font-size:12px}.onboarding-file{position:relative;min-width:0}.onboarding-file input{position:absolute;inset:0;opacity:0;cursor:pointer}.onboarding-file span{display:flex;align-items:center;min-height:44px;padding:9px 11px;border:1px dashed #b9bfdc;border-radius:11px;color:var(--brand2);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.onboarding-hint{display:none;margin-top:8px;padding:7px 9px;border-radius:9px;background:#fff5ce;color:#735900;font-weight:700}.onboarding-hint.visible{display:block}.onboarding-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;padding-top:14px;border-top:1px solid rgba(102,114,179,.16)}.onboarding-actions form{margin:0}.onboarding-actions button{min-height:42px}.onboarding-compact{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0 22px;padding:14px 16px;border:1px solid #d8dcf3;border-radius:17px;background:linear-gradient(135deg,#eef0ff,#eafbf3);box-shadow:0 6px 22px rgba(48,52,82,.08)}.onboarding-compact>div{display:flex;align-items:center;gap:12px}.onboarding-compact>div>div{display:flex;flex-direction:column}.onboarding-compact small{color:var(--muted)}.onboarding-orb{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:var(--brand);color:#fff;font-size:20px}.onboarding-success{background:#dcf7eb!important;color:#176847!important}
@media(max-width:760px){.onboarding{padding:16px;margin:14px 0 20px;border-radius:18px}.onboarding-head{grid-template-columns:1fr;gap:13px}.onboarding-head h2{font-size:21px}.onboarding-progress{text-align:left}.onboarding-cards{grid-template-columns:1fr}.onboarding-card--wide{grid-column:auto}.onboarding-card{grid-template-columns:40px minmax(0,1fr);padding:14px;gap:10px}.onboarding-icon{width:40px;height:40px;border-radius:12px;font-size:18px}.onboarding-target,.onboarding-email-forms{grid-template-columns:1fr}.onboarding-target button{width:100%}.onboarding-actions{align-items:stretch;flex-direction:column}.onboarding-actions form,.onboarding-actions button{width:100%}.onboarding-compact{align-items:stretch;flex-direction:column}.onboarding-compact form,.onboarding-compact button{width:100%}}
@media(max-width:760px){.onboarding-skip button{min-height:44px}}
.onboarding-email-forms:not(.has-code){grid-template-columns:1fr}

/* Cabinet, messaging, notifications, tests and points — 2026-09-13 */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.buy-points-nav{gap:5px;font-weight:700}.buy-points-nav>span{font-size:12px;opacity:.85}.buy-points-nav.ai-nav>span{font-size:14px;opacity:1}.presence{display:flex;align-items:center;gap:7px;margin:0;color:var(--muted);font-size:14px}.presence i{width:9px;height:9px;border-radius:50%;background:#a6a9b6;box-shadow:0 0 0 4px #a6a9b619}.presence.is-online{color:#177451}.presence.is-online i{background:#38b982;box-shadow:0 0 0 4px #38b98222}
.profile-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;padding:28px;border-radius:24px;background:linear-gradient(135deg,#fff 0,#f5f3ff 58%,#eafbf4 100%);box-shadow:0 12px 38px rgba(48,52,82,.1)}.profile-identity{display:flex;align-items:center;gap:18px}.profile-identity h1{margin:2px 0 7px}.profile-kicker{color:var(--brand2);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1.2px}.profile-balance{min-width:280px;padding:19px 21px;border-radius:18px;background:var(--brand);color:#fff}.profile-balance>span{display:block;color:#e7e9ff;font-size:13px}.profile-balance strong{display:block;margin:3px 0 14px;font-size:34px;line-height:1.1}.profile-balance strong small{font-size:14px}.profile-balance>div{display:flex;align-items:center;gap:12px}.profile-balance a:not(.primary){color:#fff;font-size:13px}.profile-balance .buy-points{background:var(--mint);color:#173e30}.profile-hero>.profile-actions{grid-column:1/-1;padding-top:16px;border-top:1px solid rgba(102,114,179,.13)}.profile-logout{margin-left:auto;color:var(--muted)}.profile-tabs{margin:20px 0 24px;padding-bottom:3px;flex-wrap:wrap;overflow:visible}.profile-tabs a{display:flex;align-items:center;gap:4px;min-height:44px;color:var(--muted);box-shadow:0 3px 12px rgba(48,52,82,.05)}.profile-tabs a b{font-size:12px}.profile-tabs a.active{background:var(--brand);color:#fff}.profile-content{min-height:260px}.profile-empty{border-radius:20px;background:#fff;box-shadow:var(--shadow)}.profile-empty>span{font-size:32px;color:var(--brand)}.profile-empty h2{margin:8px 0}.profile-section-head,.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:24px 0 13px}.profile-section-head h2,.profile-section-head p,.section-heading h2,.section-heading p{margin:0}.profile-section-head p,.section-heading p{color:var(--muted)}.profile-work-card{position:relative;padding-right:110px}.profile-work-card>.status,.score-pill{position:absolute;right:18px;top:18px;padding:5px 9px;border-radius:99px;background:#eef0fa;color:var(--brand2);font-size:12px;font-weight:800}
.messages-heading h1{margin:3px 0}.messages-heading p{margin:0;color:var(--muted)}.chat-modern{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:650px;margin-top:20px;overflow:hidden;border-radius:24px;background:#fff;box-shadow:0 14px 42px rgba(48,52,82,.1)}.chat-sidebar{padding:18px 10px 18px 18px;background:#f7f8fc}.chat-sidebar-title{display:flex;justify-content:space-between;padding:4px 10px 14px}.chat-sidebar-title span{display:grid;place-items:center;min-width:25px;height:25px;border-radius:99px;background:#e9ebfa;color:var(--brand2);font-weight:800}.chat-modern .conversation-list{display:grid;gap:5px;max-height:575px;overflow:auto;padding-right:8px}.chat-modern .conversation-link{position:relative;display:flex!important;min-width:0;padding:12px;border-radius:15px;color:var(--ink);text-decoration:none}.chat-modern .conversation-link.active{background:#fff!important;box-shadow:0 5px 18px rgba(48,52,82,.08)}.conversation-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;min-width:0;flex:1}.conversation-copy>span{display:flex;align-items:center;gap:6px}.conversation-copy i{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:var(--brand);color:#fff;font-size:10px;font-style:normal}.conversation-copy small{grid-column:1/-1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}.conversation-copy time{grid-column:2;grid-row:1;color:var(--muted);font-size:10px}.chat-list-empty{padding:42px 16px;text-align:center;color:var(--muted)}.chat-list-empty>span{font-size:32px}.chat-list-empty b{display:block;color:var(--ink)}.chat-room{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;background:linear-gradient(180deg,#fff,#fafaff)}.chat-room .chat-peer{margin:0;padding:15px 20px;border-radius:0;border-bottom:1px solid #eef0f5}.chat-profile-link{margin-left:auto;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#f0f1f8;text-decoration:none}.chat-room .message-list{max-height:none;min-height:480px;padding:22px 24px;overflow:auto}.chat-room .bubble{width:max-content;max-width:72%;margin:8px 0;padding:11px 14px;border-radius:18px;box-shadow:none}.chat-room .bubble span{display:block}.chat-room .bubble.theirs{background:#f0f1f7;border-bottom-left-radius:5px}.chat-room .bubble.mine{margin-left:auto;background:var(--brand);color:#fff;border-bottom-right-radius:5px}.chat-room .bubble.mine small{color:#e3e6ff}.chat-room .bubble small{text-align:right;margin-top:3px}.chat-room .message-form{position:static;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:14px 18px;background:#fff;border-top:1px solid #eef0f5}.chat-room .message-form textarea{min-height:48px;max-height:130px;padding:12px 15px;border:0;background:#f3f4f8}.chat-room .message-form button{min-width:112px}.chat-room .message-form .form-status{grid-column:1/-1}.chat-empty{align-self:center;text-align:center;padding:50px;color:var(--muted)}.chat-empty>span{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 14px;border-radius:20px;background:#eef0fa;color:var(--brand);font-size:29px}.chat-empty h2{color:var(--ink)}
.notifications-head{display:flex;justify-content:space-between;align-items:end;gap:20px}.notifications-head h1{margin:3px 0}.notifications-head p{margin:0;color:var(--muted)}.notification-bulk{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:22px 0 10px;padding:10px 14px;border-radius:14px;background:#e9ebf8}.notification-select-all{flex-direction:row;align-items:center}.notification-select-all input,.notification-check input{width:20px;height:20px}.notification-bulk button{min-height:42px}.notification-list{display:grid;gap:8px}.notification-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;border-radius:17px;background:#fff;box-shadow:0 5px 18px rgba(48,52,82,.06);overflow:hidden}.notification-item.is-unread{box-shadow:inset 4px 0 var(--brand),0 7px 22px rgba(48,52,82,.09)}.notification-check{padding-left:16px}.notification-main{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:13px;padding:14px 12px;color:var(--ink);text-decoration:none}.notification-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#eef0fa;color:var(--brand2);font-size:19px;font-weight:900}.is-unread .notification-icon{background:var(--brand);color:#fff}.notification-copy{display:flex;flex-direction:column;min-width:0}.notification-state{color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.8px}.is-unread .notification-state{color:var(--brand2)}.notification-copy time{color:var(--muted);font-size:12px}.notification-arrow{color:var(--brand)}.notification-delete{padding-right:12px}.notification-delete button{display:grid;place-items:center;width:40px;height:40px;padding:0;background:transparent;color:var(--muted);font-size:23px}.notification-delete button:hover{background:#fff0f1;color:var(--danger)}.notifications-empty{margin-top:24px;border-radius:22px;background:#fff}.notifications-empty>span{font-size:40px;color:#38b982}
.points-packages{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}.point-package{position:relative;margin:0;padding:22px;border-radius:20px;background:#fff;box-shadow:var(--shadow)}.point-package.featured{background:linear-gradient(180deg,#f1efff,#fff);box-shadow:0 12px 34px rgba(82,70,150,.16)}.package-badge{position:absolute;right:16px;top:16px;padding:4px 8px;border-radius:99px;background:var(--mint);color:#174e39;font-size:11px;font-weight:800}.package-points{color:var(--brand);font-size:32px;font-weight:900}.package-points small{font-size:13px}.point-package h3{margin:5px 0}.point-package p{min-height:48px;color:var(--muted)}.points-history-head{display:flex;align-items:center;justify-content:space-between;gap:28px;margin-bottom:24px;padding:28px;border-radius:24px;background:linear-gradient(135deg,#fff,#f1efff);box-shadow:var(--shadow)}.points-history-head h1{margin:5px 0 8px}.points-history-head p{margin:0;color:var(--muted)}.points-history-head aside{display:flex;min-width:220px;flex-direction:column;align-items:flex-start;gap:7px;padding:17px 19px;border-radius:17px;background:#fff}.points-history-head aside>span{color:var(--muted);font-size:13px}.points-history-head strong{color:var(--brand);font-size:30px}.points-history-head strong small{font-size:13px}.purchase-statuses{margin-top:34px}.purchase-statuses article{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 16px;border-radius:14px;background:#fff;margin:8px 0}.purchase-statuses article>div{display:flex;flex-direction:column}.purchase-statuses article span{color:var(--muted);font-size:13px}.payment-status{padding:5px 9px;border-radius:99px!important;background:#eef0f5;color:var(--muted)!important;font-weight:800}.payment-status.status-paid{background:#dcf7eb;color:#176847!important}.payment-status.status-pending{background:#fff4d8;color:#795b00!important}
.purchase-statuses .payment-transaction-id{margin-top:3px;overflow-wrap:anywhere}.payment-transaction-id code{color:var(--ink);font-size:12px}.purchase-status-actions{align-items:flex-end;gap:8px}.payment-status.status-canceled,.payment-status.status-failed{background:#ffe5e7;color:#9a3039!important}.payment-status.status-refunded{background:#e8eafb;color:#495597!important}.payment-continue{min-height:38px;padding:7px 11px;font-size:12px;white-space:nowrap}
.tests-hero{display:flex;align-items:end;justify-content:space-between;gap:30px;padding:34px;border-radius:25px;background:linear-gradient(135deg,#5964a8,#727dc1);color:#fff}.tests-hero h1{font-size:44px;margin:7px 0}.tests-hero p{max-width:590px;margin:0;color:#edf0ff;font-size:18px}.tests-heading{display:flex;justify-content:space-between;margin:28px 0 12px}.tests-heading h2{margin:0}.tests-heading span{color:var(--muted)}.test-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.test-card{display:flex;flex-direction:column;padding:22px;border-radius:20px;background:#fff;box-shadow:var(--shadow)}.test-card-top{display:flex;align-items:center;justify-content:space-between}.test-index{color:#c1c5dc;font-size:27px;font-weight:900}.test-author{color:var(--muted);font-size:12px}.test-card h2{font-size:24px}.test-card p{flex:1;color:var(--muted)}.test-meta{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.test-meta span{padding:5px 8px;border-radius:8px;background:#f2f3f8;color:var(--brand2);font-size:12px;font-weight:700}.test-start{margin-top:8px}.test-detail-hero{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:30px;padding:30px;border-radius:24px;background:linear-gradient(135deg,#5b65a8,#737dc0);color:#fff}.test-detail-hero .back-link{display:block;margin-bottom:24px;color:#fff}.test-detail-hero h1{font-size:42px;margin:8px 0}.test-detail-hero p{color:#edf0ff;font-size:18px}.test-detail-meta{display:flex;flex-wrap:wrap;gap:8px}.test-detail-meta span{padding:6px 9px;border-radius:9px;background:#ffffff16;font-size:13px}.test-detail-hero aside{align-self:center;padding:20px;border-radius:18px;background:#ffffff14}.test-detail-hero aside strong{display:block;font-size:32px}.test-detail-hero aside>div{height:8px;margin:10px 0;border-radius:99px;background:#ffffff25;overflow:hidden}.test-detail-hero aside>div i{display:block;height:100%;background:var(--mint);transition:width .2s}.modern-test-player{margin-top:22px}.test-question-card{min-width:0;margin:0 0 14px;padding:22px;border:0;border-radius:20px;background:#fff;box-shadow:var(--shadow)}.test-question-card legend{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:0 0 16px}.test-question-card legend>span{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e9ebfa;color:var(--brand2);font-weight:900}.test-question-card legend b{font-size:18px}.test-question-card legend small{color:var(--muted)}.test-question-card .tb-answer{position:relative;display:flex;flex-direction:row;align-items:center;min-height:50px;margin:7px 0;padding:11px 13px;border-radius:13px;background:#f5f6fa;cursor:pointer}.test-question-card .tb-answer:hover{background:#eef0fa}.test-question-card .tb-answer input{width:20px;height:20px}.test-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;border-radius:18px;background:#eafbf4}.test-submit-bar>div{display:flex;flex-direction:column}.test-submit-bar span{color:var(--muted)}.test-result-hero{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:30px;align-items:center;padding:34px;border-radius:25px;background:linear-gradient(135deg,#5964a8,#737dc0);color:#fff}.test-result-hero h1{font-size:40px}.test-result-hero p{color:#edf0ff;font-size:18px}.result-actions{display:flex;gap:9px}.result-actions .secondary{background:#ffffff18;color:#fff}.result-ring{display:grid;place-items:center;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at center,#6974b7 57%,transparent 58%),conic-gradient(var(--mint) calc(var(--score)*1%),#ffffff22 0)}.result-ring strong{font-size:44px}.result-ring strong small{font-size:18px}.result-ring span{margin-top:-55px;color:#eef0ff;font-size:12px}.result-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.result-summary div{display:flex;flex-direction:column;padding:16px;border-radius:16px;background:#fff}.result-summary b{color:var(--brand);font-size:28px}.result-summary span{color:var(--muted)}.test-review-list{display:grid;gap:10px}.test-review-list .tb-review{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:14px;padding:17px;border-radius:17px;background:#fff;box-shadow:0 4px 16px rgba(48,52,82,.06)}.review-status{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;font-size:23px;font-weight:900}.tb-review.correct .review-status{background:#dcf7eb;color:#177451}.tb-review.wrong .review-status{background:#ffe5e7;color:#a52e38}.tb-review>div{display:flex;flex-direction:column}.tb-review>div>small{color:var(--muted)}.review-points{color:var(--brand2);font-weight:800}.shared-custom-page{max-width:none}.shared-custom-page>header{padding:34px;border-radius:24px;background:linear-gradient(135deg,#fff,#f1f0ff);box-shadow:var(--shadow)}.shared-custom-page>header h1{font-size:44px;margin:8px 0}.shared-custom-page>header p{font-size:18px;color:var(--muted)}.shared-custom-page .pb-public-block{margin:20px 0;padding:24px;border-radius:20px;background:#fff;box-shadow:0 6px 22px rgba(48,52,82,.06)}.shared-custom-page img{max-width:100%;height:auto;border-radius:16px}.shared-page-preview{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;padding:12px 15px;border-radius:13px;background:#fff4d8}
.test-leaderboard-btn{display:inline-flex;align-items:center;gap:4px;padding:5px 10px;border:0;border-radius:8px;background:linear-gradient(135deg,#fdf6e3,#fff8ec);color:#9d7600;font-size:12px;font-weight:700;cursor:pointer;transition:background .15s,transform .1s}.test-leaderboard-btn:hover{background:linear-gradient(135deg,#fcedc4,#fdf0d0);transform:translateY(-1px)}.test-leaderboard-btn:active{transform:none}
.lb-table{display:grid;gap:6px;margin-top:8px;max-height:60vh;overflow-y:auto;padding-right:4px}.lb-row{display:grid;grid-template-columns:44px 38px minmax(0,1fr) 120px;align-items:center;gap:10px;padding:10px 14px;border-radius:14px;background:#f7f8fb;transition:transform .15s}.lb-row:hover{transform:translateX(3px)}.lb-rank-1{background:linear-gradient(135deg,#fffbe6,#fff5cc);box-shadow:0 4px 18px rgba(212,175,55,.18)}.lb-rank-2{background:linear-gradient(135deg,#f8f8f8,#f0f0f0);box-shadow:0 3px 14px rgba(140,140,140,.12)}.lb-rank-3{background:linear-gradient(135deg,#fdf5ef,#f9ede0);box-shadow:0 3px 14px rgba(176,121,60,.12)}.lb-medal{display:grid;place-items:center;font-size:22px;position:relative;line-height:1}.lb-crown{position:absolute;top:-14px;left:50%;transform:translateX(-50%);font-size:16px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.15));animation:crownBob 2s ease-in-out infinite}.lb-gold .lb-crown{animation-delay:0s}@keyframes crownBob{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-3px)}}.lb-silver{opacity:.95}.lb-pos{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#e9ebf4;color:var(--brand2);font-size:13px;font-weight:800}.lb-info{display:flex;flex-direction:column;min-width:0}.lb-info b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lb-info a{color:var(--ink);text-decoration:none}.lb-info a:hover{color:var(--brand)}.lb-info small{color:var(--muted);font-size:11px}.lb-score{display:flex;flex-direction:column;align-items:flex-end;gap:4px}.lb-score strong{color:var(--brand2);font-size:14px;white-space:nowrap}.lb-bar{display:block;width:80px;height:6px;border-radius:99px;background:#e4e5ea;overflow:hidden}.lb-bar i{display:block;height:100%;border-radius:99px;background:var(--mint);transition:width .3s}.lb-rank-1 .lb-score strong{color:#b8860b;font-size:16px}.lb-rank-1 .lb-bar i{background:linear-gradient(90deg,#f0c040,#d4af37)}.lb-rank-2 .lb-score strong{color:#6b6b6b}.lb-rank-2 .lb-bar i{background:linear-gradient(90deg,#c0c0c0,#a0a0a0)}.lb-rank-3 .lb-score strong{color:#a0652e}.lb-rank-3 .lb-bar i{background:linear-gradient(90deg,#cd9b6a,#b07840)}
@media(max-width:760px){.lb-row{grid-template-columns:36px 34px minmax(0,1fr) 90px;gap:7px;padding:8px 10px}.lb-medal{font-size:18px}.lb-score strong{font-size:12px}.lb-bar{width:60px}}
@media(max-width:760px){.profile-hero,.test-detail-hero,.test-result-hero{grid-template-columns:1fr;padding:20px}.profile-identity{align-items:flex-start}.profile-balance{min-width:0}.profile-hero>.profile-actions{align-items:stretch}.profile-hero>.profile-actions>*{width:100%}.profile-logout{margin:4px auto}.profile-section-head,.section-heading{align-items:stretch;flex-direction:column}.profile-section-head .primary{width:100%}.profile-work-card{padding-right:16px;padding-top:52px}.chat-modern{grid-template-columns:1fr;min-height:0;border-radius:19px}.chat-sidebar{padding:12px}.chat-modern .conversation-list{display:flex;max-height:none;overflow-x:auto}.chat-modern .conversation-link{flex:0 0 230px}.chat-room{min-height:560px}.chat-room .message-list{min-height:350px;padding:15px}.chat-room .bubble{max-width:88%}.chat-room .message-form{grid-template-columns:1fr auto;padding:10px}.chat-room .message-form button{min-width:48px;width:48px;font-size:0}.chat-room .message-form button:after{content:'➤';font-size:18px}.notifications-head{align-items:flex-start;flex-direction:column}.notification-main{grid-template-columns:40px minmax(0,1fr);padding:12px 8px}.notification-icon{width:40px;height:40px}.notification-arrow{display:none}.notification-check{padding-left:10px}.notification-delete{padding-right:6px}.notification-copy b{font-size:14px}.result-summary{grid-template-columns:1fr}.test-detail-hero h1,.test-result-hero h1{font-size:32px}.points-packages,.test-catalog{grid-template-columns:1fr}.points-history-head{align-items:stretch;flex-direction:column;padding:20px}.points-history-head aside{min-width:0}.tests-hero{align-items:stretch;flex-direction:column;padding:22px}.tests-hero h1{font-size:34px}.tests-hero .primary{width:100%}.test-question-card{padding:16px}.test-question-card legend{grid-template-columns:38px minmax(0,1fr)}.test-question-card legend>span{width:38px;height:38px}.test-question-card legend small{grid-column:2}.test-submit-bar{align-items:stretch;flex-direction:column}.test-submit-bar button{width:100%}.result-ring{width:220px;justify-self:center}.result-actions{flex-direction:column}.test-review-list .tb-review{grid-template-columns:40px minmax(0,1fr)}.review-points{grid-column:2}.shared-custom-page>header{padding:22px}.shared-custom-page>header h1{font-size:34px}.shared-custom-page .pb-public-block{padding:17px}.shared-page-preview{align-items:flex-start;flex-direction:column}}
@media(max-width:760px){.purchase-statuses article{align-items:stretch;flex-direction:column}.purchase-status-actions{align-items:stretch}.payment-status{align-self:flex-start}.payment-continue{width:100%;text-align:center}}
.chat-message-empty{display:grid;place-items:center;align-content:center;min-height:100%;padding:32px;text-align:center;color:var(--muted)}
.chat-message-empty>span{display:grid;place-items:center;width:58px;height:58px;margin-bottom:12px;border-radius:18px;background:#eef0fa;color:var(--brand2);font-size:25px}.chat-message-empty b{color:var(--ink);font-size:18px}.chat-message-empty p{margin:5px 0 0}
@media(max-width:760px){.points-history .table{padding:10px;overflow:visible}.points-history table,.points-history tbody{display:block}.points-history thead{display:none}.points-history tr{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0;padding:12px;border-radius:14px;background:#f7f8fb}.points-history td{display:flex;flex-direction:column;gap:2px;min-width:0;padding:0;border:0;overflow-wrap:anywhere}.points-history td:before{content:attr(data-label);color:var(--muted);font-size:11px;font-weight:600}.chat-message-empty{min-height:260px;padding:22px}}

/* Gifts catalog and administration. */
.gifts-hero{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:30px;align-items:center;padding:32px;border-radius:25px;background:linear-gradient(135deg,#5964a8,#737dc0);color:#fff;box-shadow:var(--shadow)}.gifts-hero h1{margin:6px 0 10px;font-size:44px}.gifts-hero p{max-width:650px;margin:0;color:#eef0ff;font-size:17px}.gifts-hero aside{padding:19px;border-radius:18px;background:#ffffff16}.gifts-hero aside>span{color:#e7e9ff;font-size:13px}.gifts-hero aside strong{display:block;margin:3px 0 10px;font-size:31px}.gifts-hero aside strong small{font-size:13px}.gifts-hero aside strong.gift-login-title{font-size:25px}.gifts-hero aside a{color:#fff;font-size:13px}.gift-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0 38px;align-items:start}.gift-card{overflow:hidden;border-radius:22px;background:#fff;box-shadow:0 10px 32px rgba(48,52,82,.1)}.gift-card.is-locked{box-shadow:0 6px 20px rgba(48,52,82,.06)}.gift-card.is-form-open{box-shadow:0 14px 38px rgba(48,52,82,.16)}.gift-image{display:grid;place-items:center;height:240px;overflow:hidden;background:#eef0fa;font-size:72px}.gift-image img{width:100%;height:100%;object-fit:cover}.gift-card.is-locked .gift-image img{filter:saturate(.55);opacity:.8}.gift-card-body{display:flex;flex-direction:column;gap:12px;padding:21px}.gift-card-body h2,.gift-card-body p{margin:0}.gift-card-body>p{color:var(--muted);min-height:50px}.gift-price{align-self:flex-start;padding:6px 10px;border-radius:99px;background:var(--mint);color:#174b37;font-size:18px;font-weight:900}.gift-price small{font-size:11px}.gift-meta{display:flex;flex-wrap:wrap;gap:6px}.gift-meta span{padding:5px 8px;border-radius:8px;background:#f0f2f8;color:var(--brand2);font-size:11px;font-weight:700}.gift-action{display:grid;gap:9px}.gift-reveal{width:100%;min-height:48px}.gift-unavailable{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:11px;background:#fff4d8;color:#735900;font-size:12px}.gift-order-form{margin-top:2px;padding:15px;border:1px solid #dfe2ef;border-radius:15px;background:#f8f9fd;animation:formOpen .2s ease-out}.gift-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:11px;border-bottom:1px solid var(--line)}.gift-form-head>div{display:flex;flex-direction:column}.gift-form-head small{color:var(--muted);font-weight:400}.gift-form-close{padding:5px 8px;background:transparent;color:var(--brand2);font-size:12px}.gift-order-form label{font-size:13px}.gift-order-form textarea{min-height:82px}.gift-no-fields{min-height:0!important;color:var(--muted);font-size:13px}.gift-submit{width:100%}.gift-order-form button:disabled,.gift-reveal:disabled,.admin-gifts button:disabled{cursor:not-allowed;opacity:.58}.gift-order-list{display:grid;gap:9px}.gift-order{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px 18px;border-radius:16px;background:#fff;box-shadow:0 5px 18px rgba(48,52,82,.06)}.gift-order>div{display:flex;flex-direction:column}.gift-order small{color:var(--muted)}.gift-order-id{color:var(--brand2);font-size:11px;font-weight:800}.gift-status{padding:6px 10px;border-radius:99px;background:#eef0f5;color:var(--muted);font-size:12px;font-weight:800}.gift-status.status-processing,.gift-status.status-new,.gift-status.status-pending{background:#fff4d8;color:#795b00}.gift-status.status-shipped{background:#e8eafb;color:#495597}.gift-status.status-done{background:#dcf7eb;color:#176847}.gift-status.status-canceled,.gift-status.status-cancelled{background:#ffe5e7;color:#9a3039}.gift-cancel-form{grid-column:2;display:flex;flex-direction:column;align-items:flex-end;gap:6px}.gift-cancel-form .form-error{max-width:280px;text-align:right}.gift-cancel-form button{white-space:nowrap}.gift-order details{grid-column:1/-1;padding-top:8px;border-top:1px solid var(--line)}.gift-order details summary{cursor:pointer;color:var(--brand2);font-weight:700}.gift-order details div{display:grid;grid-template-columns:140px 1fr;gap:10px;padding:5px 0;font-size:13px}.admin-gifts-head{display:flex;align-items:end;justify-content:space-between;gap:20px}.admin-gifts-head h1{margin:4px 0}.admin-gifts-head p{margin:0;color:var(--muted)}.gift-create>summary,.admin-gift>summary{cursor:pointer}.admin-gift>summary{display:flex;align-items:center;justify-content:space-between;gap:12px}.admin-gift>summary small{color:var(--muted)}.gift-admin-form{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.gift-admin-main{display:grid;grid-template-columns:130px minmax(0,1fr);gap:13px}.gift-admin-main img{grid-row:1/3;width:130px;height:130px;object-fit:cover;border-radius:16px;background:#eef0fa}.gift-admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gift-admin-form fieldset{border:1px solid var(--line);border-radius:14px;padding:13px}.gift-admin-form legend{padding:0 6px;font-weight:800}.gift-admin-form small{font-weight:400}.gift-fields-json{min-height:230px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px}.gift-json-help summary{cursor:pointer;color:var(--brand2);font-weight:700}.gift-json-help pre{overflow:auto;padding:12px;border-radius:10px;background:#f4f5f8;font-size:12px}.admin-request-list{display:grid;gap:10px}.admin-request{display:grid;grid-template-columns:minmax(210px,1fr) minmax(230px,1.3fr) auto;align-items:center;gap:14px;margin:0}.admin-request>div:first-child{display:flex;flex-direction:column}.admin-request>div:first-child span{color:var(--muted);font-size:12px}.request-details{display:flex;flex-direction:column;font-size:12px;overflow-wrap:anywhere}.admin-request form{display:grid;grid-template-columns:150px auto;gap:7px}.admin-request select,.admin-request button{min-height:43px}.admin-gift>form:last-child{margin-top:10px}
@media(max-width:760px){.gifts-hero{grid-template-columns:1fr;padding:21px}.gifts-hero h1{font-size:34px}.gift-catalog{grid-template-columns:1fr}.gift-image{height:210px}.gift-order{grid-template-columns:1fr}.gift-status{justify-self:start}.gift-cancel-form{grid-column:1;align-items:stretch}.gift-cancel-form .form-error{text-align:left}.gift-cancel-form button{width:100%}.gift-order details div{grid-template-columns:1fr;gap:0}.admin-gifts-head,.admin-gift>summary{align-items:flex-start;flex-direction:column}.gift-admin-main,.gift-admin-grid{grid-template-columns:1fr}.gift-admin-main img{grid-row:auto;width:100%;height:190px}.admin-request{grid-template-columns:1fr}.admin-request form{grid-template-columns:1fr}.admin-request form button{width:100%}}

/* Shared legal footer, consent control, and legal documents. */
.site-footer{margin-top:auto;padding-top:64px;padding-bottom:24px;color:var(--ink);text-align:left}
.site-footer-surface{padding:24px 28px 16px;border-radius:22px;background:rgba(255,255,255,.82);box-shadow:0 8px 28px rgba(48,52,82,.065)}
.site-footer-main{display:grid;grid-template-columns:minmax(220px,1.2fr) minmax(220px,1fr) minmax(270px,1.15fr);gap:32px;align-items:start}
.site-footer-about{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.site-footer-about p{max-width:30ch;margin:0;color:var(--muted);font-size:14px}
.site-footer-brand{display:inline-flex;align-items:center;min-height:44px;gap:10px;color:var(--ink)!important;text-decoration:none!important;font-size:19px}.site-footer-brand span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#e4f8ee;font-size:21px}.site-footer-brand b{font-family:"Comic Sans MS","Segoe Print",cursive}
.site-footer nav,.site-footer-contact{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.site-footer nav>b,.site-footer-contact>b{margin-bottom:4px;color:#41465e;font-size:13px}.site-footer nav a,.site-footer-contact>a,.footer-cookie-settings{display:inline-flex;align-items:center;min-height:40px;color:var(--brand2);font-size:14px;text-decoration:none;border-radius:9px}.footer-cookie-settings{width:auto;padding:0;border:0;background:transparent;font-weight:400}.site-footer nav a:hover,.site-footer-contact>a:hover,.footer-cookie-settings:hover{text-decoration:underline;background:transparent;color:var(--brand2)}.site-footer nav a:focus-visible,.site-footer-contact>a:focus-visible,.site-footer-brand:focus-visible,.footer-cookie-settings:focus-visible{outline:3px solid rgba(35,122,89,.34);outline-offset:2px}
.site-footer-contact{padding:14px 16px;border-radius:14px;background:#edf9f4}.site-footer-contact>b{color:#176847}.site-footer-contact span{color:#596661;font-size:13px}.site-footer-contact>a{min-height:36px;color:#315f50;font-weight:700;overflow-wrap:anywhere}
.site-footer-bottom{margin-top:18px;padding-top:13px;border-top:1px solid #e5e7eb;color:var(--muted);font-size:12px}
.registration-consent{display:grid;grid-template-columns:21px minmax(0,1fr);gap:9px;align-items:start;padding:11px 12px;border-radius:12px;background:rgba(255,255,255,.11);color:#fff;font-size:13px;font-weight:500;line-height:1.45}.registration-consent input{width:20px;height:20px;margin:0;accent-color:var(--mint)}.registration-consent a{color:#fff;text-decoration-color:rgba(255,255,255,.55);text-underline-offset:2px}.registration-form:has(.registration-consent input:invalid) button{opacity:.78}
.legal-wrap{width:min(960px,92%)}.legal-document{overflow:hidden;border-radius:26px;background:#fff;box-shadow:0 14px 45px rgba(48,52,82,.1)}.legal-hero{padding:40px;background:linear-gradient(135deg,#5964a8,#737dc0);color:#fff}.legal-hero>span{color:#dce0ff;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1.4px}.legal-hero h1{max-width:750px;margin:10px 0;font-size:clamp(34px,6vw,52px)}.legal-hero p{max-width:690px;margin:0 0 15px;color:#eef0ff;font-size:18px}.legal-hero small{color:#dce0ff}.legal-content{padding:34px 40px 42px}.legal-content>p:first-child{margin-top:0;padding:18px 20px;border-radius:15px;background:#f2f3fb;color:#4e5575;font-size:16px}.legal-content section{padding:7px 0 13px;border-bottom:1px solid var(--line)}.legal-content section:last-child{border-bottom:0}.legal-content h2{margin-top:22px;color:#30375d}.legal-content p{color:#454a60}.legal-content a{color:var(--brand2)}.legal-requisites{margin-top:20px;padding:20px!important;border:0!important;border-radius:17px;background:#ebfaf3}.legal-requisites h2{margin:0 0 13px;color:#245e49}.legal-requisites dl{margin:0}.legal-requisites dl>div{display:grid;grid-template-columns:180px 1fr;gap:12px;padding:7px 0}.legal-requisites dt{color:#5d6a66}.legal-requisites dd{margin:0;font-weight:700}
@media(max-width:760px){.site-footer{padding-top:42px;padding-bottom:16px}.site-footer-surface{padding:18px 16px 14px;border-radius:18px}.site-footer-main{grid-template-columns:1fr;gap:18px}.site-footer-about{gap:6px}.site-footer-about p{max-width:34ch}.site-footer nav a,.site-footer-contact>a,.footer-cookie-settings{width:100%;min-height:44px}.site-footer-contact{padding:12px 14px}.site-footer-contact>a{min-height:44px}.site-footer-bottom{margin-top:16px;padding-top:12px}.legal-hero{padding:27px 20px}.legal-hero p{font-size:16px}.legal-content{padding:21px 18px 27px}.legal-content>p:first-child{padding:14px}.legal-requisites{padding:16px!important}.legal-requisites dl>div{grid-template-columns:1fr;gap:1px}.registration-consent{font-size:12px}}

/* Common header placement for compact screens — 2026-09-13 */
.top>nav{grid-column:2/4;grid-row:1}.main-nav-links,.top>nav>.account-strip{display:contents}.main-nav-links>a{order:0}.top>nav>.account-strip>.message-link{order:1}.top>nav>.account-strip>.notification-link{order:2}.main-nav-links>.admin-nav-link{order:3}.top>nav>.account-strip>.header-profile{order:4}.top>nav>.account-strip>.points{order:5}
@media(max-width:760px){.top{grid-template-columns:minmax(0,1fr) repeat(3,40px) auto;grid-template-areas:"logo message notifications profile points" "nav nav nav nav nav";align-items:center;column-gap:4px;row-gap:2px}.top>.logo{min-width:0;gap:5px;padding:3px 4px;font-size:17px}.top>.logo span{font-size:22px}.top>nav{display:contents}.main-nav-links{grid-area:nav;display:flex;width:100%;justify-content:flex-start;margin-top:2px;overflow-x:auto;scrollbar-width:none}.main-nav-links::-webkit-scrollbar{display:none}.main-nav-links a{flex:0 0 auto}.top>nav>.account-strip{display:contents}.account-strip .message-link{grid-area:message}.account-strip .notification-link{grid-area:notifications}.account-strip .points{grid-area:points;justify-self:end;width:max-content;min-height:32px;height:32px;padding:4px 7px;border-radius:9px;font-size:12px;line-height:1;white-space:nowrap}.account-strip .header-profile{grid-area:profile}.account-strip .icon-link{width:40px;min-width:40px;height:40px;min-height:40px;padding:6px}.account-strip .header-profile{width:40px;height:40px;padding:4px}.account-strip .header-profile span:last-child{display:none}.account-strip .avatar.mini{width:32px;height:32px}}
@media(max-width:360px){.top{grid-template-columns:38px repeat(3,38px) auto;padding-inline:3%;column-gap:2px}.top>.logo{width:38px;padding:4px;justify-content:center}.top>.logo b{display:none}.top>.logo span{font-size:23px}.account-strip .icon-link,.account-strip .header-profile{width:38px;min-width:38px;height:38px;min-height:38px}.account-strip .avatar.mini{width:30px;height:30px}.account-strip .points{min-height:30px;height:30px;padding:4px 6px;font-size:11px}.top>nav a{padding-inline:7px;font-size:13px}}

/* Guest participation flow and primary one-click CTA — 2026-09-13 */
.hero .registration-form>.primary{min-height:56px;background:#70e0ac;color:#173e30;border:2px solid rgba(255,255,255,.72);box-shadow:0 8px 22px rgba(27,47,67,.22);transition:background-color .18s ease,box-shadow .18s ease,transform .18s ease}
.hero .registration-form>.primary:hover{background:#8ae8bd;color:#173e30;box-shadow:0 10px 26px rgba(27,47,67,.28);transform:translateY(-1px)}
.hero .registration-form>.primary:focus-visible{outline:3px solid #fff;outline-offset:3px;box-shadow:0 0 0 6px rgba(112,224,172,.38)}
.hero .registration-form>.primary:disabled{background:#d9dce7;color:#656a7c;border-color:#eef0f6;box-shadow:none;cursor:not-allowed;transform:none;opacity:1}
.guest-compose-cta .form-toggle{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.guest-auth-panel{display:grid;gap:15px}.guest-auth-panel h1{margin:0;font-size:29px;letter-spacing:-.5px}.guest-auth-panel>p{margin:-7px 0 2px;color:var(--muted)}.guest-auth-kicker{color:var(--brand2);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1.1px}.guest-auth-panel form{margin:0}.guest-auth-panel .registration-consent{background:#f0f2fa;color:var(--ink)}.guest-auth-panel .registration-consent a{color:var(--brand2);text-decoration-color:#aeb4dd}.guest-auth-panel .registration-consent input{accent-color:var(--brand)}.guest-auth-panel .guest-register-form>.primary{background:var(--brand);color:#fff}.guest-auth-panel .guest-register-form>.primary:hover{background:var(--brand2)}.guest-auth-panel small{color:var(--muted)}.guest-auth-divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px}.guest-auth-divider:before,.guest-auth-divider:after{content:'';height:1px;flex:1;background:var(--line)}.guest-login-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.guest-login-form button,.guest-login-form>a{grid-column:1/-1}.guest-login-form>a{justify-self:start}.auth-page{max-width:620px}.auth-page>.guest-auth-panel{padding:4px}.modal[data-guest-auth-modal] .modal-box{width:min(620px,100%)}
.primary:focus-visible,button:focus-visible,.guest-compose-cta .form-toggle:focus-visible{outline:3px solid rgba(102,114,179,.34);outline-offset:3px}.primary:disabled,button:disabled{cursor:not-allowed;opacity:.58}
@media(max-width:760px){.hero .registration-form>.primary{width:100%;min-height:56px}.guest-auth-panel h1{padding-right:34px;font-size:24px}.guest-login-form{grid-template-columns:1fr}.modal[data-guest-auth-modal]{align-items:end;padding:8px}.modal[data-guest-auth-modal] .modal-box{max-height:96vh;margin:0;border-radius:18px}.guest-compose-cta .form-toggle{width:100%}}
.comment-card .actions>.form-shell--comment.guest-compose-cta>.form-toggle,.comments-panel .form-shell--comment.guest-compose-cta>.form-toggle{min-height:44px;padding-block:7px}

/* Authentication and password recovery */
.auth-layout{display:grid;grid-template-columns:minmax(260px,.82fr) minmax(0,1.18fr);max-width:900px;margin:42px auto 10px;overflow:hidden;border-radius:24px;background:#fff;box-shadow:0 18px 55px rgba(48,52,82,.12)}
.auth-context{display:flex;min-width:0;flex-direction:column;justify-content:space-between;gap:40px;padding:38px;background:linear-gradient(145deg,#5964a8 0%,#6672b3 58%,#737dc0 100%);color:#fff}
.auth-context-brand{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;color:#fff;font-size:20px;text-decoration:none}.auth-context-brand:hover{color:#fff}.auth-context-brand span{display:grid;width:34px;height:34px;place-items:center;border-radius:11px;background:#ffffff1c}.auth-context h2{margin:9px 0 12px;font-size:30px;letter-spacing:-.6px}.auth-context p{margin:0;color:#f0f1ff}.auth-context ul{display:grid;gap:10px;margin:0;padding:0;list-style:none;color:#f0f1ff;font-size:14px}.auth-context li{display:flex;align-items:center;gap:9px}.auth-context li:before{content:'✓';display:grid;width:22px;height:22px;flex:0 0 22px;place-items:center;border-radius:50%;background:#ffffff1c;color:#fff;font-size:12px;font-weight:900}
.auth-card.card{min-width:0;margin:0;padding:38px 42px;border-radius:0;box-shadow:none}.auth-heading{display:grid;gap:8px;margin-bottom:27px}.auth-heading h1{margin:0;font-size:31px}.auth-heading p{margin:0;color:var(--muted)}.auth-heading .guest-auth-kicker{margin-bottom:1px}.guest-auth-panel{gap:0}.guest-auth-panel .auth-heading>p{margin:0}.auth-form{gap:18px;margin:0}.auth-field{gap:7px;font-size:14px}.auth-field>span:first-child{color:var(--ink)}.auth-field input{min-height:50px;border-color:#dfe1e9;background:#fbfbfd}.auth-field input::placeholder{color:#999daf}.auth-field input:hover{border-color:#bfc3d5}.auth-field input:focus{outline:3px solid rgba(102,114,179,.2);border-color:var(--brand);background:#fff}.auth-field small{font-weight:400;line-height:1.4}.auth-password-control{position:relative;display:block}.auth-password-control input{padding-right:92px}.password-toggle{position:absolute;right:6px;top:6px;min-height:38px;padding:6px 9px;background:transparent;color:var(--brand2);font-size:13px}.password-toggle:hover{background:#eef0f8}.password-toggle:focus-visible,.link-button:focus-visible,.auth-secondary-cta:focus-visible{outline:3px solid rgba(102,114,179,.3);outline-offset:2px}.auth-form-row{display:flex;justify-content:flex-end;margin-top:-7px;font-size:14px}.auth-submit{width:100%;min-height:52px}.auth-submit:disabled,.auth-secondary-cta:disabled{cursor:wait;opacity:.72}.auth-submit.is-loading span:before,.auth-secondary-cta.is-loading span:before{content:'';display:inline-block;width:15px;height:15px;margin-right:8px;border:2px solid #ffffff73;border-top-color:currentColor;border-radius:50%;vertical-align:-3px;animation:spin .7s linear infinite}.guest-auth-divider{margin:26px 0 22px}.auth-register-copy{display:grid;gap:4px}.auth-register-copy b{font-size:18px}.auth-register-copy p{margin:0;color:var(--muted);font-size:14px}.guest-auth-panel .registration-consent{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:12px 13px;border-radius:12px;background:#f3f4f8;font-size:13px;font-weight:400;line-height:1.45}.registration-consent input{width:20px;height:20px;margin:1px 0 0}.auth-secondary-cta{min-height:50px;border:1px solid #cfd3e5;background:#fff;color:var(--brand2)}.auth-secondary-cta:hover{border-color:var(--brand);background:#f5f6fb}.guest-register-form>small{text-align:center}.guest-auth-panel--modal{padding:4px}.guest-auth-panel--modal .auth-heading{padding-right:35px}.guest-auth-panel--modal .guest-login-form{display:flex;flex-direction:column}.guest-auth-panel--modal .guest-login-form>*{grid-column:auto}.guest-auth-panel--modal .auth-register-copy{display:none}.guest-auth-panel--modal .guest-auth-divider{margin:22px 0 18px}
.auth-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0 0 27px;padding:0;list-style:none}.auth-steps li{display:flex;min-width:0;align-items:center;gap:7px;color:#9699aa;font-size:12px}.auth-steps li:after{content:'';height:2px;flex:1;background:#e8e9ef}.auth-steps li:last-child:after{display:none}.auth-steps li>span{display:grid;width:27px;height:27px;flex:0 0 27px;place-items:center;border-radius:50%;background:#eceef3;color:#737789;font-weight:800}.auth-steps li.active{color:var(--brand2)}.auth-steps li.active>span{background:var(--brand);color:#fff}.auth-steps li.done{color:#237a59}.auth-steps li.done>span{background:#dff7ec;color:#176847}.auth-code-input{font-size:24px!important;font-weight:800;letter-spacing:.35em;text-align:center;font-variant-numeric:tabular-nums}.auth-reset-actions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:9px;margin-top:20px}.auth-reset-actions form{margin:0}.link-button{min-height:44px;padding:8px 0;background:transparent;color:var(--brand2);font-size:14px}.link-button:hover{color:#394583;text-decoration:underline}.link-button[disabled]{cursor:not-allowed;color:#8d90a0;text-decoration:none}.muted-link{color:var(--muted)}.password-requirements{display:flex;flex-wrap:wrap;gap:7px}.password-requirements span{padding:5px 8px;border-radius:8px;background:#f0f1f5;color:#747789;font-size:12px;font-weight:700}.password-requirements span.met{background:#def7eb;color:#176847}.auth-state-icon{display:grid;width:52px;height:52px;place-items:center;border-radius:17px;background:#dff8ec;color:#176847;font-size:26px;font-weight:900}.auth-success-heading{margin-bottom:22px}.auth-success-cta{display:flex;min-height:52px;align-items:center;justify-content:center}.auth-layout--reset .auth-context{background:linear-gradient(145deg,#4f5a98,#6672b3)}
@media(max-width:760px){.auth-layout{grid-template-columns:1fr;margin:18px auto 0;border-radius:20px}.auth-context{display:none}.auth-card.card{padding:27px 24px}.auth-heading{margin-bottom:23px}.auth-heading h1{font-size:27px}.auth-steps{margin-bottom:23px}.auth-reset-actions{flex-direction:column;align-items:flex-start}.auth-reset-actions .link-button{min-height:40px}.modal[data-guest-auth-modal] .modal-box{padding:24px 20px}.guest-auth-panel--modal .auth-heading h1{font-size:25px}}
@media(max-width:390px){.auth-layout{margin-top:10px}.auth-card.card{padding:23px 18px}.auth-heading h1{font-size:25px}.auth-steps{gap:4px}.auth-steps li{gap:5px}.auth-steps li b{font-size:11px}.auth-password-control input{padding-right:82px}.password-toggle{font-size:12px}.guest-auth-panel .registration-consent{font-size:12px}.auth-code-input{letter-spacing:.27em}}
.guest-login-form{display:flex;flex-direction:column}

/* Consent, formula composer, and shared high-contrast primary actions. */
.primary-cta{background:#515c9d;color:#fff;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
.primary-cta:hover{background:#3e477b;color:#fff}
.primary-cta:active{transform:translateY(1px)}
.primary-cta:focus-visible{outline:3px solid #237a59;outline-offset:3px;box-shadow:0 0 0 6px rgba(255,255,255,.9)}
.formula-modal-box{width:min(780px,100%)!important}
.formula-modal-box [data-formula-input]{min-height:150px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.5;resize:vertical}
.formula-live-preview{min-height:92px;padding:18px;border:1px solid #dfe2ec;border-radius:13px;background:#f8f9fd;overflow:auto}
.formula-live-preview:before{content:'Предпросмотр';display:block;margin-bottom:10px;color:var(--muted);font:700 11px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;text-transform:uppercase;letter-spacing:.8px}
.formula-live-preview .latex-block{display:block;white-space:pre-wrap;text-align:center;font-size:20px}
.cookie-consent{position:fixed;z-index:80;right:18px;bottom:18px;left:18px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 24px;align-items:center;width:min(980px,calc(100% - 36px));margin:auto;padding:18px 20px;border:1px solid #d9dceb;border-radius:18px;background:#fff;color:var(--ink);box-shadow:0 18px 55px rgba(31,35,67,.24)}
.cookie-consent-title{display:block;color:var(--ink);font-size:17px;line-height:1.35}.cookie-consent-copy p{max-width:68ch;margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.5}.cookie-consent-copy a{font-weight:700}.cookie-consent-actions{display:grid;grid-template-columns:repeat(2,minmax(128px,1fr));justify-content:end;gap:8px}.cookie-consent-actions button{min-height:44px;padding:9px 16px}.cookie-consent-actions button:not(:focus-visible){outline:none;outline-width:0;box-shadow:none}.cookie-consent-refuse{border:1px solid #aeb4cf;background:#fff;color:var(--brand2)}.cookie-consent-refuse:hover{border-color:var(--brand);background:#f2f3fa;color:var(--brand2)}.cookie-consent-refuse:focus-visible{outline:3px solid #237a59;outline-offset:3px}
@media(max-width:760px){.formula-modal-box{max-height:94vh!important}.formula-modal-box [data-formula-input]{min-height:130px}.cookie-consent{right:8px;bottom:8px;left:8px;grid-template-columns:1fr;width:auto;padding:15px;border-radius:15px}.cookie-consent-actions{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch}.cookie-consent-actions button{width:100%;padding-inline:9px}.primary-cta:focus-visible,.cookie-consent-refuse:focus-visible{outline-offset:2px;box-shadow:0 0 0 4px rgba(255,255,255,.92)}}
/* Admin events, announcement stack, and footer admin link — 2026-09-13 */
.site-footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px}.footer-admin-link{color:var(--muted);font-size:12px;text-decoration:none}.footer-admin-link:hover{color:var(--brand2)}
.announcement-stack{display:grid;gap:9px;margin:16px 0}.announcement{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0;border:1px solid #d8dcf0;background:#eef0fb}.announcement>div{display:grid;gap:3px}.announcement form{margin:0}.announcement button{width:38px;height:38px;min-height:0;padding:0;background:transparent;color:var(--muted);font-size:23px}.announcement--success{border-color:#bde8d3;background:#e8f8f0}.announcement--warning{border-color:#efd69c;background:#fff6df}
@media(max-width:760px){.site-footer-bottom{align-items:flex-start}.announcement{gap:9px}}

/* Keep expandable editors inside their card instead of using content min-width. */
.form-shell,.compose-cta-copy,.compose-cta-copy>div,.collapsible-form,.collapsible-form>*,.collapsible-form label,.collapsible-form input,.collapsible-form textarea,.collapsible-form button,.collapsible-form .editor-preview,.collapsible-form .dropzone,.collapsible-form .file-list,.formula-modal-box,.formula-modal-box>*{min-width:0;max-width:100%}
.collapsible-form{width:100%;align-self:stretch}
.compose-cta{grid-template-columns:minmax(0,1fr) auto}
.rich-toolbar{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.editor-preview,.formula-live-preview{max-width:100%;overflow-x:auto;overflow-y:hidden}
.editor-preview .latex,.editor-preview .latex-block,.editor-preview .fraction,.formula-live-preview .latex,.formula-live-preview .latex-block,.formula-live-preview .fraction{max-width:100%;overflow-x:auto}
.dropzone{width:100%;overflow:hidden}
.dropzone input[type=file]{min-width:0;max-width:100%}
.file-list>span{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
.comments-panel,.comments-list,.comments-panel .content-card,.comment-card{min-width:0;max-width:100%}
.comments-list{grid-template-columns:minmax(0,1fr)}
.comment-card .actions{min-width:0;max-width:100%;width:100%}
.comment-card .actions>*{min-width:0;max-width:100%}
.comment-card .actions>.form-shell--comment>.collapsible-form{min-width:0;max-width:100%;width:100%;flex:0 1 100%}
@media(max-width:760px){.compose-cta{grid-template-columns:minmax(0,1fr)}.comments-panel .comments-panel:not(.comments-panel--reply-only){margin:7px 0 0 4px;padding:7px 0 0 4px}.form-shell--comment .editor{padding:10px}.rich-toolbar{flex-wrap:nowrap}}


/* Best-answer integrity CTA and awarded reward state — 2026-09-13 */
.content-card[data-type="answer"]{position:relative;min-width:0}
.best{border:1px solid #b9e9d1;background:linear-gradient(180deg,#f2fcf7 0,#fff 108px);box-shadow:0 10px 30px rgba(35,122,89,.13)}
.best:before{display:none!important}
.best-answer-state{display:inline-flex;align-items:center;gap:7px;width:max-content;max-width:100%;margin:16px 0 2px;padding:7px 11px;border-radius:999px;background:#daf5e8;color:#176847;font-size:13px;font-weight:800}
.best-answer-state>span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#237a59;color:#fff;font-size:12px}
.best-answer-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px;margin:16px 0 2px;padding-top:12px;border-top:1px solid var(--line)}
.best-answer-actions form{min-width:0;margin:0}
.best-answer-form{flex:0 1 auto}
.best-answer-cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;max-width:100%;min-height:44px;padding:12px 17px;border:0;border-radius:11px;background:var(--brand2);color:#fff;font-weight:700;line-height:1.2;box-shadow:none;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
.best-answer-cta:hover{background:#3e477b;color:#fff}
.best-answer-cta:active{transform:translateY(1px)}
.best-answer-cta:focus-visible,.admin-best-answer-button:focus-visible{outline:3px solid #237a59;outline-offset:3px;box-shadow:0 0 0 6px rgba(255,255,255,.9)}
.best-answer-cta-icon{flex:0 0 auto;color:inherit;font-size:16px;font-weight:900}
.admin-best-answer-form{flex:0 1 auto;align-items:flex-start;gap:3px}.admin-best-answer-button{min-height:44px;padding:11px 13px;border:1px solid #cfd4e8;border-radius:11px;background:#f5f6fb;color:var(--brand2);transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}.admin-best-answer-button:hover{border-color:var(--brand);background:#eceefa}.admin-best-answer-button:active{transform:translateY(1px)}.admin-best-answer-form>small{color:var(--muted);font-size:11px}
.best-answer-confetti{position:absolute;z-index:8;left:0;top:0;pointer-events:none;overflow:hidden;border-radius:inherit}
.answer-summary-copy{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.list-best-marker{display:inline-flex;align-items:center;gap:5px;color:#176847;font-size:12px;font-weight:800;white-space:nowrap}.list-best-marker>span{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#daf5e8}
.reward.reward-awarded{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:#fff;opacity:.78}
@media(max-width:760px){.best-answer-actions{align-items:flex-start;flex-direction:column}.best-answer-actions form,.best-answer-form,.admin-best-answer-form{width:auto;max-width:100%;flex-basis:auto}.best-answer-cta,.admin-best-answer-button{width:auto;max-width:100%}.answer-summary-copy{gap:6px}.best-answer-state{margin-top:13px}}
@media(max-width:360px){.best-answer-actions .best-answer-form{width:100%}.best-answer-cta{width:100%}}
@media(prefers-reduced-motion:reduce){.best-answer-confetti{display:none!important}.best-answer-cta,.admin-best-answer-button{transition:none}.best-answer-cta:hover,.best-answer-cta:active,.admin-best-answer-button:active{transform:none}}

/* Editor controls, formula palette, attachment queue and public profile parity. */
.editor-preview-controls{display:flex;align-items:center;justify-content:flex-start;margin-top:-5px}.preview-toggle{min-height:40px;padding:7px 10px;background:transparent;color:var(--brand2);font-weight:700;text-decoration:underline;text-decoration-color:#b9bfe0;text-underline-offset:3px}.preview-toggle:hover{background:#eff1f8}.rich-toolbar [data-formula]{background:var(--brand);border-color:var(--brand);color:#fff}.rich-toolbar [data-formula]:hover{background:var(--brand2);color:#fff}.formula-modal-box{width:min(820px,100%);max-width:100%;overflow-x:hidden}.formula-modal-box textarea{min-height:150px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre;overflow:auto}.formula-palette{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:36vh;overflow:auto;padding:2px}.formula-palette section{min-width:0;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fafaff}.formula-palette section>b{display:block;margin-bottom:7px;color:var(--brand2);font-size:13px}.formula-preset-buttons{display:flex;flex-wrap:wrap;gap:5px}.formula-preset-buttons button{min-width:40px;min-height:38px;padding:6px 9px;background:#fff;border:1px solid #dde0ec}.formula-live-preview{min-width:0;min-height:82px;padding:12px;border:1px dashed #b8bdd7;border-radius:11px;background:#fafaff;overflow-x:auto}.formula-live-preview .latex{max-width:100%;overflow-x:auto}.file-list{width:100%;display:grid;gap:6px}.file-list>span{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;text-align:left}.file-list>span>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-queue-remove{position:relative;z-index:2;flex:0 0 34px;width:34px;height:34px;min-height:34px;padding:0;border-radius:9px;background:#fff0f1;color:var(--danger)}.public-profile-hero{grid-template-columns:minmax(0,1fr) auto;align-items:center}.public-profile-summary{display:flex;flex-direction:column;align-items:flex-end;padding:16px;border-radius:15px;background:#ffffff16}.public-profile-summary>strong{font-size:34px}.public-profile-summary small{color:var(--muted);font-weight:700}.profile-privacy-note,.profile-privacy-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:16px 0;padding:16px 18px;border:1px solid #d8dcf3;border-radius:16px;background:#f0f2ff}.profile-privacy-note{justify-content:flex-start}.profile-privacy-note b,.profile-privacy-note span{display:block}.profile-privacy-note span,.profile-privacy-banner span{color:var(--muted)}.profile-privacy-banner>div{display:flex;flex-direction:column;gap:4px}.profile-privacy-banner form{flex:0 0 auto;align-items:center;flex-direction:row;flex-wrap:wrap}.profile-privacy-banner.is-open{justify-content:flex-start;border-color:#b9ead4;background:#eafaf3}.public-profile-content{display:grid;gap:12px}.public-activity-card{margin:0}.public-activity-card header{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:13px}.public-activity-card header span{color:var(--brand2);font-weight:800}.public-activity-card .prose{margin:12px 0;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.public-activity-card>a{font-weight:700;text-decoration:none}.public-profile-tabs{margin:16px 0}.public-profile-tabs a b{margin-left:4px}.pagination a.active{background:var(--brand);color:#fff}
@media(max-width:760px){.rich-toolbar{flex-wrap:wrap;overflow-x:visible}.formula-palette{grid-template-columns:1fr;max-height:34vh}.formula-modal-box{max-height:94vh}.formula-modal-box textarea{min-height:125px}.public-profile-hero{grid-template-columns:1fr}.public-profile-summary{align-items:flex-start}.profile-privacy-banner{align-items:stretch;flex-direction:column}.profile-privacy-banner form{align-items:stretch;flex-direction:column}.public-profile-tabs{scroll-snap-type:x proximity}.public-profile-tabs a{scroll-snap-align:start;white-space:nowrap}}

.onboarding-password-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 13px;text-decoration:none}

/* Reward selector in the question editor. */
.reward-field{position:relative;display:grid;grid-template-columns:auto 150px minmax(0,1fr);align-items:center;gap:16px;min-height:108px;padding:16px 18px;overflow:hidden;border:1px solid #cceadd;border-radius:16px;background:linear-gradient(135deg,#edfbf5 0%,#f7f9ff 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.reward-field:after{content:"";position:absolute;right:-42px;bottom:-68px;width:170px;height:170px;border-radius:50%;background:radial-gradient(circle,rgba(112,224,172,.2),rgba(112,224,172,0) 70%);pointer-events:none}
.reward-field-icon{position:relative;z-index:1;display:grid;place-items:center;width:50px;height:50px;border:1px solid rgba(44,160,112,.2);border-radius:16px;background:linear-gradient(145deg,#8ce9be,#58d29b);color:#176847;font-size:24px;text-shadow:0 1px 0 rgba(255,255,255,.5);box-shadow:0 7px 18px rgba(48,185,128,.2)}
.reward-field label{position:relative;z-index:1;display:grid;gap:5px;min-width:0}
.reward-field-label{color:#557064;font-size:11px;font-weight:800;line-height:1;text-transform:uppercase;letter-spacing:.8px}
.reward-input-wrap{display:flex;align-items:center;width:142px;min-height:44px;overflow:hidden;border:1px solid #b9dfcf;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(41,112,82,.07);transition:border-color .15s ease,box-shadow .15s ease}
.reward-input-wrap:focus-within{border-color:#37b77f;box-shadow:0 0 0 3px rgba(55,183,127,.14)}
.reward-input-wrap .reward-input{width:72px;min-height:42px;margin:0;padding:8px 2px 8px 12px;border:0;background:transparent;color:#176847;font-size:18px;font-weight:850;box-shadow:none;outline:0}
.reward-input-wrap>span{padding-right:11px;color:#658075;font-size:12px;font-weight:700;white-space:nowrap}
.reward-field-copy{position:relative;z-index:1;min-width:0}
.reward-field-copy strong{display:block;margin-bottom:2px;color:#225e47;font-size:15px}
.reward-field-copy p{margin:0;color:#588071;font-size:13px;font-weight:500;line-height:1.4}
@media(max-width:760px){.reward-field{grid-template-columns:44px minmax(0,1fr);gap:11px 13px;padding:14px}.reward-field-icon{width:44px;height:44px;border-radius:14px;font-size:21px}.reward-field label{grid-column:2}.reward-field-copy{grid-column:1/-1}.reward-input-wrap{width:min(100%,160px)}}

/* Branded balance card in public profiles. */
.public-profile-summary{background:var(--mint);color:#fff;box-shadow:0 8px 22px rgba(48,185,128,.22)}
.public-profile-summary>span,.public-profile-summary>small{color:#fff}

/* Cancel state for the question and answer form toggles. */
.compose-cta>.form-toggle.form-toggle--cancel{border:1px solid #c0c5e0;background:transparent;color:var(--brand2);box-shadow:none}
.compose-cta>.form-toggle.form-toggle--cancel:hover{border-color:var(--brand);background:#f2f3fa;color:var(--brand2);box-shadow:none;transform:none}

/* Branded 404 page. */
.not-found{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,.9fr);align-items:center;gap:42px;min-height:510px;overflow:hidden;padding:58px 60px;border-radius:28px;background:linear-gradient(135deg,#fff 0%,#f5f3ff 54%,#e9faf3 100%);box-shadow:0 18px 55px rgba(48,52,82,.12)}
.not-found:before{content:'';position:absolute;left:-90px;bottom:-150px;width:320px;height:320px;border-radius:50%;background:rgba(102,114,179,.07)}
.not-found-copy{position:relative;z-index:2;max-width:540px}
.not-found-kicker{display:inline-flex;align-items:center;min-height:30px;padding:5px 10px;border-radius:999px;background:#e8eafb;color:var(--brand2);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:1.1px}
.not-found h1{max-width:500px;margin:16px 0 13px;font-size:clamp(38px,5.5vw,61px);line-height:1.02;letter-spacing:-2px}
.not-found-copy>p{max-width:480px;margin:0;color:var(--muted);font-size:18px}
.not-found-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:27px}
.not-found-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:11px 19px}
.not-found-primary{box-shadow:0 8px 20px rgba(102,114,179,.25)}
.not-found-secondary{border:1px solid #d9dced;background:rgba(255,255,255,.72)}
.not-found-links{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:24px;color:var(--muted);font-size:13px}
.not-found-links a{font-weight:800;text-decoration:none}
.not-found-visual{position:relative;display:grid;place-items:center;align-content:center;min-height:350px;isolation:isolate}
.not-found-visual:before{content:'';position:absolute;z-index:-2;width:320px;height:320px;border-radius:50%;background:linear-gradient(145deg,#6672b3,#535e9e);box-shadow:0 24px 50px rgba(72,81,145,.28)}
.not-found-visual:after{content:'';position:absolute;z-index:-1;width:250px;height:250px;border:1px solid rgba(255,255,255,.18);border-radius:50%}
.not-found-code{display:flex;align-items:center;color:#fff;font-size:76px;font-weight:900;line-height:1;letter-spacing:-6px;text-shadow:0 5px 18px rgba(38,43,83,.25)}
.not-found-code span{display:grid;place-items:center;width:84px;height:84px;margin:0 8px;border-radius:27px;background:var(--mint);font-size:46px;letter-spacing:0;transform:rotate(-6deg);box-shadow:0 10px 25px rgba(21,67,49,.2)}
.not-found-hint{position:absolute;bottom:17px;padding:9px 13px;border:1px solid rgba(255,255,255,.65);border-radius:12px;background:rgba(255,255,255,.93);color:var(--brand2);font-size:12px;font-weight:800;box-shadow:0 8px 22px rgba(42,46,80,.15)}
.not-found-orbit{position:absolute;width:355px;height:355px;border:1px dashed rgba(102,114,179,.25);border-radius:50%}
.not-found-dot{position:absolute;display:block;border-radius:50%;box-shadow:0 6px 14px rgba(48,52,82,.15)}
.not-found-dot--one{top:12px;right:42px;width:21px;height:21px;background:var(--mint)}
.not-found-dot--two{left:3px;bottom:73px;width:14px;height:14px;background:#fff}
.not-found-dot--three{right:4px;bottom:91px;width:10px;height:10px;background:#aeb6ed}
@media(max-width:850px){.not-found{grid-template-columns:1fr;gap:22px;padding:42px}.not-found-copy{max-width:640px}.not-found-visual{min-height:330px}}
@media(max-width:760px){.not-found{gap:14px;min-height:0;padding:31px 20px 27px;border-radius:22px}.not-found h1{margin-top:13px;font-size:38px;letter-spacing:-1.2px}.not-found-copy>p{font-size:16px}.not-found-actions{display:grid;grid-template-columns:1fr 1fr;margin-top:22px}.not-found-actions a{padding-inline:11px}.not-found-links{justify-content:center;text-align:center}.not-found-visual{min-height:264px}.not-found-visual:before{width:232px;height:232px}.not-found-visual:after{width:188px;height:188px}.not-found-orbit{width:262px;height:262px}.not-found-code{font-size:57px}.not-found-code span{width:66px;height:66px;margin:0 6px;border-radius:21px;font-size:35px}.not-found-hint{bottom:8px}.not-found-dot--one{top:5px;right:28px}.not-found-dot--two{left:5px;bottom:54px}}
@media(max-width:390px){.not-found-actions{grid-template-columns:1fr}.not-found-links>span:first-child{width:100%}}

/* Vector wordmark based on the original hand-drawn logo. */
.top>.logo{position:relative;isolation:isolate;width:145px;height:47px;padding:5px 0;overflow:hidden}
.top>.logo:before{content:"";position:absolute;z-index:0;left:3.2px;top:7.7px;width:19.6px;height:22.7px;clip-path:polygon(50% 0,72% 5%,88% 18%,98% 37%,95% 54%,82% 70%,75% 82%,67% 100%,33% 100%,25% 82%,18% 70%,5% 54%,2% 37%,12% 18%,28% 5%);background:radial-gradient(ellipse at 50% 34%,#fffbd7 0 18%,#ffe77a 50%,#ffc94d 100%);filter:drop-shadow(0 0 1.5px rgba(255,224,92,.22));opacity:0;transform:scale(.65);transition:opacity .2s ease,transform .25s ease,filter .25s ease}
.top>.logo img{position:relative;z-index:1;display:block;flex:0 0 auto;width:145px;height:auto;max-width:none}
.top>.logo:hover:before,.top>.logo:focus-visible:before{opacity:1;transform:scale(1);filter:drop-shadow(0 0 3px rgba(255,224,92,.38))}
@media(max-width:760px){.top>.logo{width:132px;height:42px;padding:4px 0}.top>.logo:before{left:2.9px;top:6.4px;width:17.8px;height:20.7px}.top>.logo img{width:132px}}
@media(max-width:360px){.top>.logo{width:34px;height:40px;padding:2px 0;justify-content:flex-start}.top>.logo:before{left:3.2px;top:4.7px;width:19.6px;height:22.7px}.top>.logo img{width:145px}}

/* Legacy mathematical textures. */
body{background-color:#fafafa;background-image:url("bg7.png");background-attachment:fixed}
.top{background-image:url("header3.png")}

/* Homepage welcome hero. */
.hero-home{position:relative;isolation:isolate;overflow:hidden;grid-template-columns:minmax(0,1.15fr) minmax(330px,.85fr);align-items:center;gap:44px;min-height:430px;padding:48px 50px;border:1px solid rgba(255,255,255,.16);background:radial-gradient(circle at 8% 8%,rgba(255,255,255,.13),transparent 32%),radial-gradient(circle at 91% 92%,rgba(112,224,172,.18),transparent 34%),linear-gradient(135deg,#5964a8 0%,#6571b5 54%,#4d578f 100%);box-shadow:0 22px 55px rgba(49,56,104,.2)}
.hero-home:before,.hero-home:after{content:"";position:absolute;z-index:-1;border-radius:50%;pointer-events:none}
.hero-home:before{right:-82px;top:-125px;width:310px;height:310px;border:1px solid rgba(255,255,255,.12);box-shadow:0 0 0 34px rgba(255,255,255,.035),0 0 0 76px rgba(255,255,255,.025)}
.hero-home:after{left:44%;bottom:-158px;width:270px;height:270px;background:rgba(112,224,172,.065)}
.hero-copy{position:relative;z-index:1;align-self:center}
.hero-home .eyebrow{display:inline-flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.09);color:#f0f2ff;letter-spacing:1.35px;box-shadow:inset 0 1px rgba(255,255,255,.08)}
.hero-home .eyebrow:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--mint);box-shadow:0 0 0 4px rgba(112,224,172,.14)}
.hero-home h1{max-width:650px;margin:20px 0 17px;font-size:clamp(48px,5.2vw,66px);line-height:.99;letter-spacing:-2.8px;text-wrap:balance}
.hero-home h1 span{color:#8aebbe;text-shadow:0 7px 22px rgba(24,61,47,.17)}
.hero-home .hero-copy>p{max-width:540px;margin:0;color:#f0f2ff;font-size:18px;line-height:1.55}
.hero-benefits{display:flex;flex-wrap:wrap;gap:8px 16px;margin:24px 0 0;padding:0;list-style:none;color:#fff;font-size:13px;font-weight:700}
.hero-benefits li{display:flex;align-items:center;gap:7px}
.hero-benefits li:before{content:"✓";display:grid;place-items:center;width:21px;height:21px;border-radius:7px;background:rgba(112,224,172,.18);color:#9bf2ca;font-size:12px}
.hero-registration{position:relative;z-index:1;align-self:center;gap:15px;margin:0;padding:24px;border:1px solid rgba(255,255,255,.56);border-radius:20px;background:rgba(255,255,255,.94);color:var(--ink);box-shadow:0 18px 45px rgba(35,40,78,.24);backdrop-filter:blur(12px)}
.hero-registration-heading{display:flex;align-items:center;gap:12px;margin-bottom:2px}
.hero-registration-heading>span{display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border-radius:14px;background:#e6f8ef;color:#25805d;font-size:21px;box-shadow:inset 0 0 0 1px rgba(56,185,130,.12)}
.hero-registration-heading>div{display:flex;min-width:0;flex-direction:column}
.hero-registration-heading b{font-size:18px;line-height:1.25}
.hero-registration-heading small{color:var(--muted);font-size:12px;line-height:1.35}
.hero-registration .registration-consent{padding:12px 13px;border:1px solid #e5e7ef;background:#f5f6fa;color:#4a4e62;font-size:12px;line-height:1.45}
.hero-registration .registration-consent a{color:var(--brand2);text-decoration-color:#aeb4dd}
.hero-registration .registration-consent input{margin-top:1px;accent-color:#38b982}
.hero-home .hero-registration>.primary{min-height:55px;border:0;background:linear-gradient(135deg,#65d5a2,#78e2b2);color:#174b37;box-shadow:0 8px 20px rgba(35,122,89,.22)}
.hero-home .hero-registration>.primary:hover{background:linear-gradient(135deg,#78e2b2,#91ebc3);box-shadow:0 11px 24px rgba(35,122,89,.28)}
.hero-registration-note{display:flex!important;align-items:center;justify-content:center;gap:7px;color:#676b7d!important;text-align:center;line-height:1.35}
.hero-registration-note>span{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#e3f8ee;color:#237a59;font-weight:900}
@media(max-width:900px){.hero-home{grid-template-columns:minmax(0,1fr) minmax(300px,.85fr);gap:26px;padding:40px 34px}.hero-home h1{font-size:clamp(43px,6vw,58px)}.hero-benefits{gap:8px 12px}}
@media(max-width:760px){.hero-home{grid-template-columns:1fr;gap:27px;min-height:0;padding:28px 20px 20px;border-radius:22px}.hero-home:before{right:-145px;top:-165px}.hero-home:after{left:-90px;bottom:-185px}.hero-home h1{margin:17px 0 14px;font-size:clamp(40px,12vw,53px);letter-spacing:-2px}.hero-home .hero-copy>p{font-size:16px}.hero-benefits{margin-top:18px}.hero-registration{width:100%;padding:19px;border-radius:17px}.hero-registration-heading b{font-size:17px}}
@media(max-width:430px){.hero-home{padding:23px 16px 16px}.hero-home .eyebrow{padding:6px 9px;font-size:10px}.hero-benefits{display:grid;grid-template-columns:1fr 1fr}.hero-benefits li:last-child{grid-column:1/-1}.hero-registration{padding:16px}.hero-registration-heading>span{width:39px;height:39px;flex-basis:39px}.hero-home .hero-registration>.primary{padding-inline:12px;font-size:14px}}

/* Guest login action in the common header. */
.top .header-login{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 12px;border:1px solid rgba(255,255,255,.24);border-radius:11px;background:rgba(255,255,255,.12);color:#fff;font-weight:750;line-height:1;text-decoration:none;box-shadow:inset 0 1px rgba(255,255,255,.08);transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
.top .header-login svg{flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.top .header-login:hover,.top .header-login:focus-visible{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.38);color:#fff;text-decoration:none;box-shadow:0 5px 15px rgba(39,45,91,.16)}
@media(max-width:760px){.top.top-guest{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"logo login" "nav nav"}.top-guest .guest-account-strip .header-login{grid-area:login;justify-self:end;height:40px;min-height:40px;padding:7px 11px}.top-guest .main-nav-links{grid-area:nav}}
@media(max-width:360px){.top.top-guest{grid-template-columns:minmax(0,1fr) auto}.top-guest .guest-account-strip .header-login{padding-inline:10px}}

/* Page header actions row. */
.pb-public-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pb-parent-link{margin-left:auto;display:inline-flex;align-items:center;gap:5px;padding:6px 12px;background:#eef0f8;border-radius:9px;font-size:13px;color:var(--brand2);text-decoration:none;transition:background .15s,color .15s}.pb-parent-link:hover{background:#e2e5f3;color:var(--brand)}.pb-parent-link b{font-weight:700}
@media(max-width:760px){.pb-parent-link{margin-left:0;width:100%;order:3}}

/* Questions embedded as standalone custom-page blocks. */
.pb-public-block.pb-type-question_by_id>.content-card{margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}

/* Edit bar above header. */
.pb-edit-bar{display:flex;justify-content:flex-end;margin-bottom:10px}

/* Page avatar in public header. */
.pb-header-with-avatar{display:flex;gap:24px;align-items:flex-start;margin-top:12px}
.pb-page-avatar{width:150px;min-width:150px;max-height:200px;object-fit:cover;border-radius:16px;box-shadow:0 4px 20px rgba(0,0,0,.18);margin-top:10px}
.pb-header-text{flex:1;min-width:0}
@media(max-width:700px){.pb-header-with-avatar{flex-direction:column;align-items:center;text-align:center}.pb-page-avatar{width:120px;min-width:120px;max-height:160px}}

/* Linked page card inside page_by_id blocks. */
.pb-linked-page{display:flex;flex-direction:column;gap:2px;text-decoration:none;color:var(--brand2);transition:color .15s}.pb-linked-page:hover{color:var(--brand)}.pb-linked-page b{font-weight:700}.pb-linked-page span{color:var(--muted);font-size:14px}

/* Test player question cards. */
.modern-test-player{display:grid;gap:16px}
.test-question-card{min-width:0;margin:0;padding:0;overflow:hidden;border:1px solid #e1e3ed;border-radius:20px;background:#fff;box-shadow:0 8px 24px rgba(48,52,82,.07)}
.test-question-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;border-bottom:1px solid #e8e9f0;background:#f8f9fc}
.test-question-head>div{display:flex;align-items:center;gap:11px}
.test-question-head strong{color:var(--muted);font-size:13px;letter-spacing:.03em;text-transform:uppercase}
.test-question-head>small{padding:5px 9px;border-radius:99px;background:#e9ebfa;color:var(--brand2);font-weight:800;white-space:nowrap}
.test-question-number{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--brand);color:#fff;font-weight:900;font-variant-numeric:tabular-nums}
.test-question-content{min-width:0;padding:24px 24px 8px;font-size:16px;line-height:1.55;overflow-wrap:anywhere}
.test-question-content img{display:block;max-width:100%;height:auto;margin:18px 0 0;border:1px solid #dfe1e9;border-radius:12px;background:#fff}
.test-question-content h2,.test-question-content h3,.test-question-content h4{margin:0 0 12px;line-height:1.3}
.test-question-content .latex-block{max-width:100%;overflow-x:auto}
.test-answer-label{margin:18px 24px 8px;padding-top:18px;border-top:1px solid #eceef3;color:var(--muted);font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.test-question-card .test-text-answer{width:calc(100% - 48px);min-height:52px;margin:0 24px 24px}
.test-question-card .tb-answer{margin:8px 24px;padding:12px 14px;border:1px solid transparent;background:#f5f6fa;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.test-question-card .tb-answer:last-child{margin-bottom:24px}
.test-question-card .tb-answer:hover{border-color:#d7daea;background:#f0f2fa}
.test-question-card .tb-answer:has(input:checked){border-color:#aeb5db;background:#eef0fb;box-shadow:inset 3px 0 var(--brand)}
.test-question-card .tb-answer input{flex:0 0 auto;accent-color:var(--brand)}
.tb-answer--has-image{flex-wrap:wrap}.tb-answer-img{display:block;width:100%;max-width:280px;max-height:160px;object-fit:contain;border-radius:8px;border:1px solid #e1e3ed;margin-top:8px;background:#fafafd}
.tb-review-explanation{margin-top:8px;padding:10px 14px;border-radius:10px;background:#fffdf5;border-left:3px solid #c4a835;font-size:14px;line-height:1.5;color:var(--ink);min-width:0}.tb-review-explanation>b{display:block;font-size:12px;color:#9d7600;margin-bottom:3px;text-transform:uppercase;letter-spacing:.03em}.tb-review-explanation-body{overflow-wrap:anywhere}.tb-review-explanation-body h2,.tb-review-explanation-body h3,.tb-review-explanation-body h4{margin:8px 0 4px;font-size:15px;line-height:1.3}.tb-review-explanation-body .latex,.tb-review-explanation-body .latex-block{max-width:100%;overflow-x:auto}.tb-review-explanation-body .latex-block{display:block}
@media(max-width:760px){.modern-test-player{gap:12px}.test-question-card{border-radius:17px}.test-question-head{padding:12px 16px}.test-question-head strong{font-size:12px}.test-question-content{padding:19px 16px 6px;font-size:14px}.test-question-content img{margin-top:14px;border-radius:10px}.test-answer-label{margin:16px 16px 8px;padding-top:16px}.test-question-card .test-text-answer{width:calc(100% - 32px);margin:0 16px 18px}.test-question-card .tb-answer{margin:7px 16px}.test-question-card .tb-answer:last-child{margin-bottom:18px}}
.top .points{transition:color .5s,text-shadow .5s,background .5s}.top .points.points-flash{color:#fff;text-shadow:0 0 10px #fff,0 0 24px #70e0ac;background:#3cc47e}
.md-table-wrap{max-width:100%;margin:10px 0;overflow-x:auto}
.md-table{width:100%;border-collapse:collapse;font-size:.95em}
.md-table th,.md-table td{padding:7px 10px;border:1px solid #d9dce8;vertical-align:top;text-align:left;overflow-wrap:anywhere}
.md-table th{background:#f3f4fb;font-weight:800}
.md-table tbody tr:nth-child(even) td{background:#fafbfe}
.comment-card .md-table{font-size:13px}
.comment-card .md-table th,.comment-card .md-table td{padding:5px 8px}
.table-size{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.code-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.code-choice-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 14px;border:2px solid #e1e3ef;border-radius:12px;background:#fafbfe;cursor:pointer;transition:border-color .15s,background .15s}
.code-choice-btn:hover{border-color:var(--brand);background:#f0f2fa}
.code-choice-btn b{font-size:16px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--brand)}
.code-choice-btn span{font-size:13px;color:var(--muted)}
.md-code-block{position:relative;background:#f3f4fb;border:1px solid #e1e3ef;border-radius:8px;padding:12px 14px;overflow-x:auto;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em;white-space:pre;margin:10px 0}
.md-code-block code{background:none;padding:0;border:none;font-size:inherit}
.md-code-block[data-lang]::before{content:attr(data-lang);position:absolute;top:6px;right:10px;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;pointer-events:none}
.mathplus-ready .mathplus-fraction{display:inline-flex;flex-direction:column;margin:0 .25em;text-align:center;vertical-align:middle;line-height:1.15}
.mathplus-ready .mathplus-numerator,.mathplus-ready .mathplus-denominator{display:block;padding:.12em .35em}
.mathplus-ready .mathplus-denominator{border-top:1px solid currentColor}
.mathplus-ready .mathplus-radicand{display:inline-block;padding:0 .12em;border-top:1px solid currentColor;line-height:1.1;vertical-align:baseline;margin-top:.08em}
.mathplus-ready .mathplus-vector{display:inline-block;border-top:1px solid currentColor;line-height:1}
.mathplus-ready sub,.mathplus-ready sup{font-size:80%}
.question-heading{margin:0 0 14px;font-size:clamp(18px,2.5vw,24px);font-weight:700;line-height:1.3;color:var(--ink)}
.liked-item-wrap{position:relative}.liked-context-link{display:inline-block;margin-bottom:6px;padding:4px 12px;border-radius:10px;background:#f0edfa;color:var(--brand);font-size:13px;font-weight:600;text-decoration:none;transition:background .15s}.liked-context-link:hover{background:#e4dff7}
.profile-goto-link{display:inline-flex;align-items:center;gap:5px;margin-top:12px;padding:8px 16px;background:var(--brand);color:#fff;border-radius:10px;font-size:14px;font-weight:700;text-decoration:none;transition:background .15s}.content-card .profile-goto-link,.profile-goto-link:hover,.content-card .profile-goto-link:hover{color:#fff;text-decoration:none}.profile-goto-link:hover,.content-card .profile-goto-link:hover{background:var(--brand2)}
.profile-work-actions{display:flex;align-items:center;gap:12px;margin-top:8px}.profile-work-actions a{text-decoration:none;font-weight:700}.profile-work-actions .profile-goto-link{margin-top:0}

/* ── Edit-modal layout fix ── */
.modal-box > .card.editor{
  max-height:none;
  overflow:visible;
  width:auto;
  margin:0;
  padding:0;
  background:transparent;
  box-shadow:none;
  border-radius:0
}
.modal-box > .editor textarea[name=body]{
  min-height:150px;
  resize:vertical
}
.modal-box > .editor .reward-field,
.modal-box > .editor .rich-toolbar,
.modal-box > .editor .dropzone,
.modal-box > .editor .submit-button{
  flex-shrink:0
}
@media(max-width:760px){
  .modal{
    align-items:start;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch
  }
  .modal > .modal-box{
    max-height:none;
    margin:8px 0
  }
  .modal-box > .editor textarea[name=body]{
    min-height:120px
  }
}

/* Tag autocomplete */
.tag-ac-wrap{position:relative}
.tag-ac-list{position:absolute;z-index:30;left:0;right:0;top:100%;margin:4px 0 0;padding:0;list-style:none;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 32px rgba(48,52,82,.13);max-height:260px;overflow:auto}
.tag-ac-item{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;cursor:pointer;transition:background .1s}
.tag-ac-item:first-child{border-radius:12px 12px 0 0}
.tag-ac-item:last-child{border-radius:0 0 12px 12px}
.tag-ac-item:only-child{border-radius:12px}
.tag-ac-item:hover,.tag-ac-active{background:#eff0f8}
.tag-ac-name{font-weight:600;color:var(--ink)}
.tag-ac-count{font-size:12px;color:var(--muted);background:#f0f1f5;padding:2px 8px;border-radius:99px;font-weight:700;min-width:24px;text-align:center}

/* Admin tag cards */
.admin-tags-list{display:grid;gap:0}
.tag-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;margin:8px 0}
.tag-card-info{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.tag-card-name{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tag-card-info code{font-size:13px;background:#f0f1f5;border-radius:6px;padding:2px 6px;color:var(--muted)}
.tag-card-info small{color:var(--muted);font-size:12px;margin-left:6px}
.tag-card-actions{display:flex;gap:6px;flex-shrink:0}
.tag-btn-rename,.tag-btn-merge,.tag-btn-delete{padding:8px 13px;border-radius:10px;font-size:13px;font-weight:600;min-height:0;cursor:pointer}
.tag-btn-rename{background:#eef0f8;color:var(--brand2)}
.tag-btn-rename:hover{background:#e2e5f3}
.tag-btn-merge{background:#edfbf5;color:#177451}
.tag-btn-merge:hover{background:#d8f5e8}
.tag-btn-delete{background:#fff0f1;color:var(--danger)}
.tag-btn-delete:hover{background:#ffe0e2}
@media(max-width:760px){
  .tag-card{flex-direction:column;align-items:flex-start;gap:10px}
  .tag-card-actions{width:100%;flex-wrap:wrap}
  .tag-btn-rename,.tag-btn-merge,.tag-btn-delete{flex:1;text-align:center}
}

.symbols-panel{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;max-height:240px;overflow:auto;margin:8px 0;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fafaff}
.symbols-panel section{min-width:0}
.symbols-panel section>b{display:block;margin-bottom:6px;color:var(--brand2);font-size:13px}
.symbols-list{display:flex;flex-wrap:wrap;gap:4px}
.symbols-panel .symbol-btn{min-width:36px;min-height:36px;padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:#fff;color:inherit;font-size:16px;line-height:1;cursor:pointer}
.symbols-panel .symbol-btn:hover,.symbols-panel .symbol-btn:focus-visible{background:#eff1f8;border-color:var(--brand)}
@media(max-width:760px){.symbols-panel{grid-template-columns:1fr;max-height:200px}}

/* Header "Еще" dropdown */
.nav-more{position:relative;order:0;flex:0 0 auto;display:flex;align-items:center}
.top nav .nav-more-toggle{display:flex;align-items:center;gap:4px;min-height:44px;padding:10px 9px;border:0;border-radius:10px;background:transparent;color:#fff;font:inherit;font-size:14px;white-space:nowrap;cursor:pointer}
.top nav .nav-more-toggle:hover,.top nav .nav-more.is-open .nav-more-toggle{background:#ffffff18}
.nav-more-toggle span{font-size:11px;transition:transform .15s}
.nav-more.is-open .nav-more-toggle span{transform:rotate(180deg)}
.nav-more-menu{position:fixed;z-index:60;min-width:170px;padding:6px;border-radius:12px;background:#fff;box-shadow:0 10px 30px #1f255a40;display:flex;flex-direction:column;gap:2px}
.nav-more-menu[hidden]{display:none}
.top nav .nav-more-menu a{display:flex;align-items:center;min-height:40px;padding:8px 12px;color:var(--ink);font-size:14px;border-radius:8px}
.top nav .nav-more-menu a:hover,.top nav .nav-more-menu a:focus-visible{background:#eff1f8;color:var(--brand)}
@media(max-width:760px){.top nav .nav-more-toggle{padding:8px 7px;font-size:13px}}