/* EBEClaw shared sidebar component — isolated namespace (ebs-). */
.ebs-sidebar{box-sizing:border-box;align-self:start;position:sticky;top:100px;width:100%;min-width:0;padding:0 22px;background:linear-gradient(180deg,#f3eee7 0%,#f7f3ed 100%);border:1px solid #ded6cb;border-radius:4px;box-shadow:var(--eb-shadow-soft,none);color:var(--ink,#28231e)}
.ebs-sidebar *{box-sizing:border-box}
.ebs-sidebar .ebs-section{margin:0;padding:22px 0;border:0;border-bottom:1px solid #ded6cb;background:transparent;min-width:0}
.ebs-sidebar .ebs-section:last-child{border-bottom:0}
.ebs-sidebar .ebs-section-title{display:flex;align-items:center;gap:9px;margin:0 0 13px;font:600 11px/1.4 var(--sans,Inter,sans-serif);letter-spacing:.13em;text-transform:uppercase;color:var(--ink,#28231e)}
.ebs-sidebar .ebs-section-title:before{content:"";width:15px;height:1px;flex:0 0 15px;background:var(--accent,#873d36)}
.ebs-sidebar .ebs-author{display:flex;align-items:flex-start;gap:14px;min-width:0}
.ebs-sidebar .ebs-author-image{flex:0 0 64px;width:64px;height:64px}
.ebs-sidebar .ebs-author-photo{display:block;width:64px;height:64px;object-fit:cover;border-radius:50%;border:2px solid #fffdfa;box-shadow:0 3px 12px rgba(38,28,20,.12)}
.ebs-sidebar .ebs-author-content{min-width:0}
.ebs-sidebar .ebs-author-name{margin:0;color:var(--ink,#28231e);font:600 19px/1.3 var(--serif,Georgia,serif)}
.ebs-sidebar .ebs-author-description{margin:7px 0 11px;color:var(--mute,#777);font:400 12px/1.6 var(--sans,Inter,sans-serif)}
.ebs-sidebar .ebs-author-link{display:inline-flex;gap:6px;align-items:center;color:var(--accent,#873d36);font:600 11px/1.5 var(--sans,Inter,sans-serif);text-decoration:none;transition:gap .2s ease,color .2s ease}
.ebs-sidebar .ebs-author-link:hover{gap:10px;color:var(--accent-dark,var(--accent,#873d36))}
.ebs-sidebar .ebs-category-list{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;min-width:0;max-width:100%;overflow:visible}
.ebs-sidebar .ebs-category-list a{display:inline-flex;flex:0 0 auto;align-items:center;max-width:100%;padding:6px 11px;border:1px solid #d4cbbf;border-radius:3px;background:transparent;color:var(--ink,#28231e);font:500 12px/1.4 var(--sans,Inter,sans-serif);text-decoration:none;white-space:nowrap;transition:background .2s ease,border-color .2s ease,color .2s ease}
.ebs-sidebar .ebs-category-list a:hover,.ebs-sidebar .ebs-category-list a.is-current{background:var(--accent,#873d36);border-color:var(--accent,#873d36);color:#fff}
.ebs-sidebar .ebs-newsletter{margin:0 -22px;padding:22px;background:#f0eae1;border-radius:0 0 3px 3px}
.ebs-sidebar .ebs-newsletter-copy{margin:0 0 13px;color:var(--mute,#777);font:400 12px/1.55 var(--sans,Inter,sans-serif)}
.ebs-sidebar .ebs-message{margin:0 0 12px;color:var(--ink,#28231e);font:500 12px/1.5 var(--sans,Inter,sans-serif)}
.ebs-sidebar .ebs-newsletter-form{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;min-width:0}
.ebs-sidebar .ebs-input{display:block;width:100%;min-width:0;min-height:40px;margin:0;padding:9px 12px;border:1px solid #d4cbbf;border-radius:3px;background:transparent;color:var(--ink,#28231e);font:400 14px/1.3 var(--sans,Inter,sans-serif);box-shadow:none;outline:none;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}
.ebs-sidebar .ebs-input::placeholder{color:#91887e;opacity:1}
.ebs-sidebar .ebs-input:hover{border-color:#b7a99a}
.ebs-sidebar .ebs-input:focus,.ebs-sidebar .ebs-input:focus-visible{border-color:var(--accent,#873d36);background:#fff;box-shadow:0 0 0 3px rgba(135,61,54,.12)}
.ebs-sidebar .ebs-submit{display:block;width:100%;min-width:0;min-height:40px;margin:0;padding:10px 16px;border:1px solid var(--accent,#873d36);border-radius:3px;background:var(--accent,#873d36);color:#fff;font:600 14px/1.2 var(--sans,Inter,sans-serif);white-space:nowrap;cursor:pointer;transition:background .2s ease,border-color .2s ease,transform .2s ease}
.ebs-sidebar .ebs-submit:hover{background:var(--accent-dark,var(--accent,#873d36));border-color:var(--accent-dark,var(--accent,#873d36));transform:translateY(-1px)}
.ebs-sidebar .ebs-submit:focus-visible{outline:2px solid var(--accent,#873d36);outline-offset:3px}
.ebs-sidebar .ebs-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
@media(max-width:1024px){.ebs-sidebar{position:static;margin-top:8px}.ebs-sidebar .ebs-category-list{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding:2px 2px 10px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:none}.ebs-sidebar .ebs-category-list::-webkit-scrollbar{display:none;width:0;height:0}.ebs-sidebar .ebs-category-list a{scroll-snap-align:start}}
@media(max-width:640px){.ebs-sidebar{padding-inline:16px;margin-top:16px}.ebs-sidebar .ebs-section{padding:18px 0}.ebs-sidebar .ebs-newsletter{margin-inline:-16px;padding:18px}.ebs-sidebar .ebs-author-name{font-size:18px}}

/* v2: Match the category empty-state cream wash; remove the newsletter separator and stale fill. */
.ebs-sidebar{background:linear-gradient(135deg,#f7f3ed 0%,#fbf9f5 62%,#f2ece4 100%);}
.ebs-sidebar .ebs-section.ebs-newsletter{border-bottom:0;background:transparent;}
.ebs-sidebar .ebs-newsletter{background:transparent;}

/* Homepage intro divider: a quiet editorial rule before the three-column publication layout. */
body.ebeclaw .eb-home-intro-divider{width:100%;height:1px;margin:0 0 clamp(22px,3vw,36px);background:var(--line,#ded8cf);opacity:.95}
/* Animated newsletter success state; message remains readable without animation. */
.ebs-sidebar .ebs-message-success{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:var(--ink,#28231e)}
.ebs-sidebar .ebs-success-icon{display:inline-grid;place-items:center;flex:0 0 28px;width:28px;height:28px;color:#55745b}
.ebs-sidebar .ebs-success-icon svg{display:block;width:28px;height:28px;overflow:visible}
.ebs-sidebar .ebs-success-ring{fill:none;stroke:currentColor;stroke-width:1.7;stroke-dasharray:88;stroke-dashoffset:88;animation:ebs-ring-draw .5s ease-out forwards}
.ebs-sidebar .ebs-success-check{fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:20;stroke-dashoffset:20;animation:ebs-check-draw .36s .36s ease-out forwards}
@keyframes ebs-ring-draw{to{stroke-dashoffset:0}}
@keyframes ebs-check-draw{to{stroke-dashoffset:0}}
@media(prefers-reduced-motion:reduce){.ebs-sidebar .ebs-success-ring,.ebs-sidebar .ebs-success-check{animation:none;stroke-dashoffset:0}}

/* Sticky sidebar follows the editorial column on larger screens; small screens return to flow. */
@media(min-width:901px){
  body.ebeclaw .eb-main.eb-home-grid>.ebs-sidebar,
  body.ebeclaw .eb-archive .eb-archive-grid>.ebs-sidebar{
    position:sticky!important;top:100px!important;align-self:start!important;
  }
}
@media(max-width:900px){
  body.ebeclaw .eb-main.eb-home-grid>.ebs-sidebar,
  body.ebeclaw .eb-archive .eb-archive-grid>.ebs-sidebar{
    position:static!important;top:auto!important;max-height:none!important;overflow:visible!important;
  }
}
/* AJAX subscribe state: spinner replaces button label while the request is pending. */
.ebs-sidebar .ebs-submit:disabled{opacity:.88;cursor:wait;transform:none!important}
.ebs-sidebar .ebs-button-loader{display:inline-block;width:13px;height:13px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:ebs-spin .7s linear infinite;vertical-align:-2px;margin-right:8px}
@keyframes ebs-spin{to{transform:rotate(360deg)}}
.ebs-sidebar .ebs-success-card{display:flex;align-items:flex-start;gap:12px;margin:2px 0 0;padding:16px 14px;border:1px solid #ded6cb;border-radius:4px;background:linear-gradient(135deg,#f7f3ed 0%,#fbf9f5 62%,#f2ece4 100%);box-shadow:0 5px 18px rgba(38,29,19,.035);color:var(--ink,#28231e)}
.ebs-sidebar .ebs-success-card .ebs-success-icon{flex-basis:30px;width:30px;height:30px}
.ebs-sidebar .ebs-success-card .ebs-success-icon svg{width:30px;height:30px}
.ebs-sidebar .ebs-success-copy{display:flex;flex-direction:column;gap:3px;min-width:0;font:400 12px/1.55 var(--sans,Inter,sans-serif)}
.ebs-sidebar .ebs-success-copy strong{font:600 14px/1.35 var(--sans,Inter,sans-serif);color:var(--ink,#28231e)}
.ebs-sidebar .ebs-ajax-error{margin:12px 0 0!important;padding:12px 14px;border:1px solid #e2c8c2;border-radius:3px;background:#fff7f5;color:#843d36}
@media(prefers-reduced-motion:reduce){.ebs-sidebar .ebs-button-loader{animation:none;border-top-color:rgba(255,255,255,.85)}}
