.an-trigger{position:relative}
.an-count{position:absolute;top:-5px;right:-6px;min-width:17px;height:17px;padding:0 3px;border-radius:9px;background:var(--acc);color:var(--on-accent);font-size:10px;line-height:17px;text-align:center}

.an-dialog{position:fixed;width:min(560px,calc(100vw - 28px));max-height:min(86dvh,760px);margin:auto;padding:0;overflow:hidden;
  border:1px solid var(--line);border-radius:16px;background:var(--surf);color:var(--fg);box-shadow:0 30px 90px #0000005c}
.an-dialog[open]{display:flex;flex-direction:column;animation:an-in .26s cubic-bezier(.2,.8,.2,1)}
.an-dialog::backdrop{background:#0b0b10b8;backdrop-filter:blur(6px)}
@keyframes an-in{from{opacity:0;transform:translateY(12px) scale(.98)}}
@media(prefers-reduced-motion:reduce){.an-dialog[open]{animation:none}}
.an-close{position:absolute;z-index:3;top:12px;right:12px;display:grid;place-items:center;width:32px;height:32px;padding:0;
  border:0;border-radius:50%;background:transparent;color:var(--dim);cursor:pointer}
.an-close:hover{background:var(--hole);color:var(--fg)}
.an-close .ui-icon{width:18px;height:18px}
.an-dialog:has(.an-card.is-wide) .an-close{top:18px;right:18px;background:#00000073;color:#fff;backdrop-filter:blur(6px)}
.an-dialog:has(.an-card.is-wide) .an-close:hover{background:#000000a6}

/* The bell's list. */
.an-heading{display:flex;align-items:center;gap:12px;padding:16px 56px 16px 20px;border-bottom:1px solid var(--line)}
.an-dialog[data-view="card"] .an-heading{display:none}
.an-symbol{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:var(--soft);color:var(--acc)}
.an-heading h2{flex:1;margin:0;font-size:16px;font-weight:650;overflow-wrap:anywhere}
.an-content{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.an-dialog[data-view="list"] .an-content{min-height:100px;padding:6px 20px 16px}
.an-item{display:flex;flex-direction:column;gap:3px;width:100%;padding:14px 8px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--fg);text-align:left;cursor:pointer;white-space:normal}
.an-item:hover{background:var(--hole)}
.an-item strong{font-size:14px;font-weight:550;overflow-wrap:anywhere}
.an-item.unread strong{font-weight:700}
.an-item span{font-size:12px;color:var(--dim)}
.an-empty{margin:35px 0;text-align:center;color:var(--dim)}

/* One notice: key visual + headline + a few lines + one button. */
.an-dialog[data-view="card"]{width:min(460px,calc(100vw - 28px))}
.an-dialog[data-view="card"]:has(.an-card.has-hero){width:min(760px,calc(100vw - 28px))}
.an-dialog[data-view="card"]:has(.an-card.is-wide){width:min(580px,calc(100vw - 28px))}
.an-card{display:flex;align-items:stretch;transition:opacity .2s}
.an-card.is-pending{opacity:0}
.an-hero{position:relative;flex:0 0 44%;min-height:380px;margin:8px 0 8px 8px;overflow:hidden;border-radius:10px;background:#0d0d10}
.an-hero>img,.an-hero>video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.an-card.is-wide{flex-direction:column}
.an-card.is-wide .an-hero{flex:none;min-height:0;aspect-ratio:16/9;margin:8px 8px 0}
.an-sound{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;
  background:#00000080;color:#fff;cursor:pointer;backdrop-filter:blur(6px)}
.an-sound:hover{background:#000000b3}
.an-sound .ui-icon{width:16px;height:16px}
.an-copy{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:28px 30px 26px}
.an-card.has-hero:not(.is-wide) .an-copy{padding:30px 30px 26px 26px}
.an-card.is-wide .an-copy{padding:22px 26px 24px}
.an-brand{width:104px;height:20px;flex:0 0 auto;color:var(--fg)}
.an-card:not(.has-hero) .an-brand,.an-card.is-wide .an-brand{display:none}
.an-tag{padding:2px 8px;border-radius:4px;background:var(--soft);color:var(--acc);font-size:12px;font-weight:650;line-height:20px}
.an-card.has-hero:not(.is-wide) .an-tag{margin-top:6px}
.an-headline{margin:0;padding-right:28px;font-size:26px;line-height:1.35;font-weight:760;overflow-wrap:anywhere;text-wrap:balance}
.an-card.is-wide .an-headline{padding-right:0;font-size:22px}
.an-headline strong{color:var(--acc);font-weight:inherit}
.an-body{align-self:stretch;color:var(--fg);font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.an-body>:first-child{margin-top:0}
.an-body>:last-child{margin-bottom:0}
.an-body p{margin:0 0 8px}
.an-body strong{color:var(--acc);font-weight:650}
.an-body a{color:var(--acc)}
.an-body ul,.an-body ol{display:grid;gap:6px;margin:0 0 8px;padding:0;list-style:none}
.an-body li{position:relative;padding-left:15px}
.an-body li::before{content:"";position:absolute;left:2px;top:.68em;width:5px;height:5px;border-radius:50%;background:var(--acc)}
.an-body h1,.an-body h2,.an-body h3{margin:12px 0 6px;font-size:15px;line-height:1.5}
.an-body img,.an-body video{display:block;width:100%;max-height:50dvh;margin:10px 0;border-radius:8px;background:#0d0d10}
.an-body pre{overflow-x:auto;padding:12px;border-radius:6px;background:var(--hole)}
.an-body blockquote{margin:10px 0;padding-left:12px;border-left:2px solid var(--acc);color:var(--dim)}
.an-cta{align-self:stretch;display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;margin-top:8px;padding:10px 18px;
  border-radius:999px;background:var(--acc);color:var(--on-accent);font-size:15px;font-weight:650;text-decoration:none;
  box-shadow:0 6px 18px color-mix(in srgb,var(--acc) 28%,transparent);transition:background .15s,transform .15s}
.an-cta:hover{background:var(--acc-d)}
.an-cta:active{transform:translateY(1px)}
.an-cta .ui-icon{width:17px;height:17px}
/* Side layout: brand on top, button at the bottom, the message centred between them. */
.an-card.has-hero:not(.is-wide) .an-brand{margin-bottom:auto}
.an-card.has-hero:not(.is-wide) .an-cta{margin-top:auto}
.an-card.has-hero:not(.is-wide) .an-copy{gap:16px}
.an-heading h2:focus,.an-headline:focus{outline:none}
.an-back{padding:2px 0;border:0;background:none;color:var(--dim);font-size:12px;cursor:pointer}
.an-back:hover{color:var(--fg)}

@media(max-width:640px){
  .an-dialog[data-view="list"] .an-content{padding:6px 14px 16px}
  .an-heading{padding:12px 52px 12px 14px}
  .an-card,.an-card.has-hero{flex-direction:column}
  .an-hero,.an-card.is-wide .an-hero{flex:none;min-height:0;aspect-ratio:16/10;max-height:42dvh;margin:8px 8px 0}
  .an-dialog:has(.an-card.has-hero) .an-close{top:18px;right:18px;background:#00000073;color:#fff}
  .an-copy,.an-card.has-hero:not(.is-wide) .an-copy,.an-card.is-wide .an-copy{gap:12px;padding:20px 20px 22px}
  .an-card.has-hero .an-brand{display:none}
  .an-headline,.an-card.is-wide .an-headline{padding-right:0;font-size:21px}
  .an-card:not(.has-hero) .an-headline{padding-right:28px}
}
