/* Nezerite.PW handbook v3.3.4 — reader-first layout with copy action */
.hb-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);gap:20px;align-items:start;min-width:0}
.hb-wrap .panel{border:1px solid #34232d;border-radius:24px;background:linear-gradient(155deg,rgba(24,18,29,.96),rgba(12,11,17,.98));box-shadow:0 18px 60px rgba(0,0,0,.28);overflow:hidden}
.hb-main{min-width:0;display:flex;flex-direction:column;gap:18px}
.hb-side{position:sticky;top:92px;padding:15px;max-height:calc(100dvh - 118px);display:flex;flex-direction:column;gap:12px}
.hb-side-top,.hb-list-top,.hb-reader-head,.hb-reader-foot,.hb-editor-buttons{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hb-side-title,.hb-list-top{font-size:10px;letter-spacing:.16em;color:#c49ca7;font-weight:900}
.hb-new{border:1px solid #81323f;border-radius:12px;background:linear-gradient(135deg,#d6304e,#8d1d38);color:#fff;font-size:12px;font-weight:800;padding:10px 12px;cursor:pointer;box-shadow:0 10px 24px rgba(213,50,84,.18)}
.hb-new:hover,.hb-wrap .primary:hover{filter:brightness(1.12)}
.hb-search{display:flex;align-items:center;gap:7px;padding:10px 12px;border-radius:14px;background:#100e15;border:1px solid #372733;color:#ff5e79}
.hb-search input{background:transparent!important;border:0!important;outline:0!important;color:#fff!important;min-width:0;width:100%;padding:0!important;box-shadow:none!important;font-size:13px}
.hb-categories{display:grid;grid-template-columns:1fr;gap:6px;border-bottom:1px solid #33252d;padding-bottom:12px}
.hb-categories button{border:1px solid transparent;border-radius:13px;text-align:left;padding:11px 12px;color:#c2b6c2;background:transparent;font-size:12px;font-weight:700;cursor:pointer;transition:.18s ease}
.hb-categories button:hover{color:#fff;background:#241923}
.hb-categories button.active{color:#fff;border-color:#8e3048;background:linear-gradient(120deg,rgba(218,55,93,.18),rgba(116,31,62,.13));box-shadow:inset 3px 0 #ff496b,0 0 0 1px rgba(255,82,110,.08)}
.hb-list-top{margin-top:2px}
.hb-list-top small{font-size:11px;letter-spacing:0}
.hb-list{overflow:auto;min-height:120px;max-height:56dvh;display:flex;flex-direction:column;gap:10px;padding-right:4px}
.hb-doc{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:start;text-align:left;gap:10px;padding:13px 12px;border:1px solid #2d2430;border-radius:16px;background:linear-gradient(155deg,#14111a,#120f16);color:#d8cfda;cursor:pointer;transition:background .16s,border-color .16s,transform .16s,box-shadow .16s}
.hb-doc:hover{background:linear-gradient(155deg,#241722,#18141c);border-color:#8b3047;transform:translateY(-1px);box-shadow:0 10px 24px rgba(255,72,105,.08)}
.hb-doc.selected{border-color:#ff4567;background:linear-gradient(135deg,rgba(58,27,39,.96),rgba(27,20,28,.96));box-shadow:0 0 0 1px rgba(255,77,111,.16),0 18px 34px rgba(74,18,36,.18)}
.hb-doc-num{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:linear-gradient(135deg,#351926,#241722);border:1px solid #503140;color:#ff9cad;font-size:11px;font-weight:900;letter-spacing:.06em}
.hb-doc.selected .hb-doc-num{background:linear-gradient(135deg,#ff4466,#a61f3d);border-color:#ff6d88;color:#fff}
.hb-doc-main{min-width:0;display:flex;flex-direction:column;gap:6px}
.hb-doc-title{font-size:14px;color:#fff;overflow-wrap:anywhere;line-height:1.25}
.hb-doc-summary{font-size:11px;color:#b8acb9;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.45}
.hb-doc-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;color:#a79fa9;margin-top:2px}
.hb-doc-state,.hb-label{padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
.hb-published{color:#7bf0b9!important;background:rgba(40,170,112,.13)}
.hb-draft{color:#ffc987!important;background:rgba(234,145,34,.12)}
.hb-archived{color:#b6acbd!important;background:rgba(160,160,175,.11)}
.hb-reader{min-height:560px;position:relative}
.hb-reader-head{padding:18px 24px;border-bottom:1px solid #342833;background:linear-gradient(100deg,rgba(202,42,74,.10),rgba(160,29,60,.03) 45%,transparent)}
.hb-reader-topline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hb-reader-tools{display:flex;align-items:center;gap:10px}
.hb-breadcrumb{color:#fa667f;font-size:11px;font-weight:900;letter-spacing:.13em;text-transform:uppercase}
.hb-copy{border-radius:12px!important;border-color:#5b3040!important;background:linear-gradient(135deg,rgba(47,28,36,.92),rgba(28,23,31,.92))!important;color:#fff!important;box-shadow:0 12px 30px rgba(0,0,0,.18)}
.hb-copy:hover{transform:translateY(-1px);border-color:#e24b67!important}
.hb-reader-body{padding:26px 30px 36px;min-height:390px;overflow-wrap:anywhere}
.hb-reader-foot{padding:15px 25px;border-top:1px solid #322834;color:#aca0ae;font-size:11px;flex-wrap:wrap}
.hb-actions{display:flex;gap:10px}
.hb-article-title{font-size:clamp(28px,3vw,38px)!important;line-height:1.08!important;letter-spacing:-.045em!important;color:#fff!important;margin:0 0 15px!important}
.hb-article-intro{font-size:14px;color:#d1c3cf;border-left:3px solid #ed405e;padding-left:15px;margin:0 0 28px;line-height:1.7}
.hb-prose{color:#e7dfe7;font-size:14px;line-height:1.82;max-width:980px;display:flex;flex-direction:column;gap:10px}
.hb-prose h2{font-size:24px;color:#fff;margin:26px 0 10px;line-height:1.35}.hb-prose h3{font-size:19px;color:#ff758b;margin:24px 0 10px}.hb-prose h4{font-size:15px;color:#fff;margin:18px 0 9px}
.hb-prose p{margin:0;white-space:pre-wrap}.hb-prose ul,.hb-prose ol{padding-left:26px;margin:4px 0 14px}.hb-prose li{padding:4px 0}.hb-prose li::marker{color:#f14b67}
.hb-prose blockquote{padding:12px 18px;background:#251a26;border-left:3px solid #ee4560;border-radius:0 12px 12px 0;white-space:pre-wrap}
.hb-rule-card,.hb-note-card{border:1px solid #372531;border-radius:18px;background:linear-gradient(155deg,rgba(27,20,31,.94),rgba(17,14,20,.98));padding:16px 18px;box-shadow:0 10px 26px rgba(0,0,0,.16)}
.hb-rule-card{position:relative;overflow:hidden}
.hb-rule-card::before{content:'';position:absolute;inset:0 auto 0 0;width:4px;background:linear-gradient(180deg,#ff4d6f,#8d2740)}
.hb-ruleline{font-size:15px;font-weight:800;color:#fff;line-height:1.7;padding-left:8px}
.hb-ruletext{font-size:14px;color:#ddd0db;line-height:1.75;padding-left:8px;margin-top:6px}
.hb-penalty{margin-top:10px;padding:12px 14px 12px 16px;border-radius:14px;background:linear-gradient(135deg,rgba(97,27,46,.30),rgba(41,21,31,.75));border:1px solid rgba(225,83,110,.22);color:#ffd6df;font-weight:700;line-height:1.65}
.hb-note-title{font-size:15px;color:#fff;font-weight:800}
.hb-notetext{margin-top:8px;font-size:14px;color:#ddd0db;line-height:1.72}
.hb-welcome{display:grid;place-content:center;text-align:center;min-height:330px;max-width:430px;margin:auto;color:#a99dab}.hb-welcome h2{font-size:26px;color:#fff;margin:0 0 14px}.hb-welcome p{line-height:1.7;font-size:14px}.hb-welcome-icon{font-size:56px;color:#ff425f;text-shadow:0 0 40px #c91d5170;margin-bottom:18px}
.hb-empty{padding:20px 12px;color:#b5a6b4;font-size:12px;line-height:1.6}
.hb-editor{padding:20px 24px}.hb-editor .panel-head{padding:0 0 16px!important;margin-bottom:18px}.hb-editor-grid{display:grid;grid-template-columns:1fr 210px;gap:12px}.hb-editor textarea{font:13px/1.65 ui-monospace,Consolas,monospace;min-height:250px;resize:vertical}.hb-editor-hint{font-size:12px;color:#aa9ca8}.hb-editor-buttons{justify-content:flex-start;flex-wrap:wrap}.hb-danger{color:#ff8093!important;border-color:#86314b!important}.hb-form-message{font-size:12px;color:#80e5b7}.hb-form-message.is-error{color:#ff8690}
.hb-revisions{padding:20px}.hb-rev{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #332632;padding:13px 4px;color:#ccc0cd;font-size:12px}.hb-rev:last-child{border-bottom:0}
@media(max-width:1100px){.hb-wrap{grid-template-columns:minmax(0,1fr) 300px}}
@media(max-width:760px){.hb-wrap{grid-template-columns:minmax(0,1fr)}.hb-main{order:2}.hb-side{order:1;position:static;max-height:none}.hb-list{max-height:290px}.hb-categories{grid-template-columns:repeat(2,minmax(0,1fr))}.hb-categories button{font-size:11px}.hb-reader{min-height:320px}.hb-reader-head{padding:14px 17px;align-items:flex-start;flex-direction:column}.hb-reader-tools{width:100%}.hb-copy{width:100%;justify-content:center}.hb-reader-body{padding:20px 17px;min-height:245px}.hb-reader-foot{padding:14px 17px}.hb-editor{padding:16px}.hb-editor-grid{grid-template-columns:1fr}}
@media(max-width:390px){.hb-categories{grid-template-columns:1fr}.hb-side{padding:12px}.hb-doc{grid-template-columns:34px minmax(0,1fr)}.hb-doc-title{font-size:13px}}
@media(prefers-reduced-motion:reduce){.hb-doc,.hb-categories button,.hb-copy{transition:none!important}}

/* Nezerite.PW v3.3.6 — Compact Handbook (visual-only patch).
   No PHP, JavaScript, API or database changes. */
.hb-wrap{grid-template-columns:minmax(0,1fr) minmax(238px,286px);gap:12px}
.hb-wrap .panel{border-radius:17px;box-shadow:0 10px 32px rgba(0,0,0,.22)}
.hb-main{gap:11px}
.hb-side{top:76px;padding:11px;gap:8px;max-height:calc(100dvh - 92px)}
.hb-side-top,.hb-list-top,.hb-reader-head,.hb-reader-foot,.hb-editor-buttons{gap:8px}
.hb-side-title,.hb-list-top{font-size:10px;letter-spacing:.12em}
.hb-new{border-radius:9px;padding:7px 10px;font-size:11px}
.hb-search{padding:7px 10px;border-radius:10px}
.hb-search input{font-size:12px}
.hb-categories{gap:4px;padding-bottom:8px}
.hb-categories button{padding:7px 9px;border-radius:9px;font-size:11px}
.hb-list-top{margin-top:0}
.hb-list{gap:6px;max-height:61dvh;padding-right:3px;min-height:90px}
.hb-doc{grid-template-columns:27px minmax(0,1fr);gap:8px;padding:9px 9px;border-radius:12px}
.hb-doc-num{width:26px;height:26px;border-radius:8px;font-size:10px}
.hb-doc-main{gap:3px}
.hb-doc-title{font-size:12px;line-height:1.3}
.hb-doc-summary{font-size:10px;line-height:1.4;-webkit-line-clamp:1}
.hb-doc-meta{gap:6px;margin-top:2px;font-size:9px;flex-wrap:wrap}
.hb-doc-state,.hb-label{font-size:9px;padding:3px 7px}
.hb-reader{min-height:370px}
.hb-reader-head{padding:11px 16px}
.hb-reader-topline{gap:7px}
.hb-reader-tools{gap:6px}
.hb-copy{border-radius:9px!important;padding:7px 11px!important;font-size:11px!important;min-height:unset!important}
.hb-breadcrumb{font-size:10px;letter-spacing:.10em}
.hb-reader-body{padding:16px 19px 24px;min-height:270px}
.hb-reader-foot{padding:10px 16px;font-size:10px}
.hb-actions{gap:7px}
.hb-article-title{font-size:clamp(23px,2.6vw,30px)!important;line-height:1.16!important;letter-spacing:-.03em!important;margin:0 0 10px!important}
.hb-article-intro{font-size:12px;line-height:1.5;padding-left:10px;margin:0 0 15px}
.hb-prose{font-size:12.5px;line-height:1.56;gap:6px}
.hb-prose h2{font-size:18px;margin:15px 0 5px;line-height:1.35}
.hb-prose h3{font-size:15px;margin:12px 0 5px}
.hb-prose h4{font-size:13px;margin:10px 0 5px}
.hb-prose ul,.hb-prose ol{padding-left:20px;margin:3px 0 9px}
.hb-prose li{padding:2px 0}
.hb-prose blockquote{padding:9px 12px;border-radius:0 9px 9px 0}
.hb-rule-card,.hb-note-card{padding:10px 12px;border-radius:12px;box-shadow:0 5px 17px rgba(0,0,0,.12)}
.hb-rule-card::before{width:3px}
.hb-ruleline{font-size:12.5px;line-height:1.55;padding-left:5px;font-weight:730}
.hb-ruletext{font-size:12px;line-height:1.5;padding-left:5px;margin-top:4px}
.hb-penalty{margin-top:7px;padding:7px 10px;border-radius:9px;line-height:1.45;font-size:12px;font-weight:700}
.hb-note-title{font-size:12.5px;line-height:1.5}
.hb-notetext{margin-top:5px;font-size:12px;line-height:1.55}
.hb-welcome{min-height:240px}
.hb-welcome h2{font-size:22px}
.hb-welcome p{font-size:12px;line-height:1.55}
.hb-welcome-icon{font-size:40px;margin-bottom:12px}
.hb-editor{padding:14px 16px}
.hb-editor .panel-head{padding-bottom:10px!important;margin-bottom:10px}
.hb-editor textarea{font-size:12px;min-height:210px}
.hb-editor-hint{font-size:11px}
.hb-revisions{padding:14px}
.hb-rev{padding:9px 3px;font-size:11px}
@media(max-width:1100px){.hb-wrap{grid-template-columns:minmax(0,1fr) 252px;gap:10px}}
@media(max-width:760px){
  .hb-wrap{grid-template-columns:minmax(0,1fr);gap:10px}
  .hb-side{position:static;max-height:none;padding:10px}
  .hb-categories{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hb-list{max-height:220px;gap:5px}
  .hb-reader{min-height:270px}
  .hb-reader-head{padding:10px 13px}
  .hb-reader-tools{width:100%}
  .hb-copy{width:100%}
  .hb-reader-body{padding:14px 13px;min-height:200px}
  .hb-reader-foot{padding:10px 13px}
  .hb-editor{padding:13px}
  .hb-editor-grid{grid-template-columns:1fr}
}
@media(max-width:390px){.hb-categories{grid-template-columns:1fr}.hb-doc{grid-template-columns:26px minmax(0,1fr);gap:7px}.hb-side{padding:9px}.hb-article-title{font-size:23px!important}}

/* v3.3.7 — Left-hand navigation / right-hand reader. Keep v3.3.6 compact sizing. */
@media (min-width: 761px) {
  .hb-wrap,
  .hb-wrap.hb-reverse {
    grid-template-columns: minmax(238px, 286px) minmax(0, 1fr);
    align-items: start;
  }
  .hb-wrap > .hb-side {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .hb-wrap > .hb-main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .hb-wrap,
  .hb-wrap.hb-reverse {
    grid-template-columns: minmax(220px, 252px) minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .hb-wrap,
  .hb-wrap.hb-reverse {grid-template-columns: minmax(0, 1fr)}
  .hb-wrap > .hb-side {grid-column: 1; grid-row: 1; order: 1}
  .hb-wrap > .hb-main {grid-column: 1; grid-row: 2; order: 2}
}

/* v3.3.10 — copy icon on each rule card. Preserve compact left-navigation layout. */
.hb-prose .hb-rule-card{position:relative}
.hb-prose .hb-rule-card .hb-ruleline{padding-right:39px}
.hb-rule-copy{position:absolute;right:8px;top:7px;display:flex;align-items:center;justify-content:center;width:29px;height:29px;min-width:29px;min-height:29px;padding:0;border-radius:9px;border:1px solid rgba(255,109,134,.32);background:linear-gradient(140deg,rgba(80,32,50,.9),rgba(38,22,34,.92));color:#ffc1cc;font:700 18px/1 Arial,sans-serif;cursor:pointer;transition:transform .16s,border-color .16s,background .16s,box-shadow .16s;z-index:1}
.hb-rule-copy:hover{transform:translateY(-1px);border-color:#ff6a86;background:#582035;box-shadow:0 3px 15px rgba(240,59,98,.18)}
.hb-rule-copy:focus-visible{outline:2px solid #ff7d99;outline-offset:2px}
.hb-rule-copy.is-copied{color:#8bffca;border-color:rgba(72,217,146,.6);background:rgba(17,76,50,.8)}
.hb-rule-copy.is-error{color:#ffb8be;border-color:#fd596a}
.hb-rule-copy:disabled{cursor:default}
@media(max-width:600px){.hb-prose .hb-rule-card .hb-ruleline{padding-right:40px}.hb-rule-copy{right:7px;top:7px;width:31px;height:31px}}
@media(prefers-reduced-motion:reduce){.hb-rule-copy{transition:none!important}}
