/* ----------------------------------------------------------------------------
   Public Updates section
---------------------------------------------------------------------------- */
.updates-public{
  display:grid;
  gap:18px;
}

.updates-public__loading,
.updates-public__comments-empty,
.empty-state{
  display:grid;
  place-items:center;
  min-height:180px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  text-align:center;
  padding:20px;
}

.updates-public__feature{
  display:grid;
  gap:18px;
}

.updates-public__feature-card{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(320px,0.9fr);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--shadow);
  overflow:hidden;
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.updates-public__feature-card:hover{
  transform:translateY(-2px);
  border-color:rgba(239,207,114,.34);
  box-shadow:0 18px 34px rgba(0,0,0,.34);
}

.updates-public__feature-image{
  aspect-ratio:16 / 9;
  background:#0b0b0b;
  overflow:hidden;
}

.updates-public__feature-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.updates-public__feature-copy{
  display:grid;
  align-content:start;
  gap:10px;
  padding:18px 18px 16px;
}

.updates-public__feature-meta{
  margin:0;
  color:var(--gold-soft);
  font-size:.8rem;
  line-height:1.2;
  letter-spacing:.03em;
}

.updates-public__feature-copy h2{
  margin:0;
  font-size:1.45rem;
  line-height:1.12;
  color:#fff;
}

.updates-public__feature-copy p{
  margin:0;
  color:var(--muted);
}

.updates-public__feature-footer{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:4px;
}

.updates-public__rail{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
}

.updates-public__rail-card{
  display:grid;
  gap:10px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.10);
  padding:10px;
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease, background .16s ease;
}

.updates-public__rail-card:hover{
  transform:translateY(-2px);
  border-color:rgba(239,207,114,.28);
  background:rgba(255,255,255,.05);
}

.updates-public__rail-image{
  width:100%;
  aspect-ratio:16 / 9;
  background:#0b0b0b;
  overflow:hidden;
}

.updates-public__rail-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.updates-public__rail-copy{
  display:grid;
  gap:5px;
  min-width:0;
}

.updates-public__rail-copy h3{
  margin:0;
  font-size:.92rem;
  line-height:1.2;
  color:#fff;
}

.updates-public__rail-meta{
  margin:0;
  color:var(--gold-soft);
  font-size:.74rem;
  line-height:1.2;
}

.updates-public__rail-empty{
  grid-column:1 / -1;
  display:grid;
  place-items:center;
  min-height:120px;
  border:1px dashed rgba(255,255,255,.10);
  color:var(--muted);
  background:rgba(255,255,255,.02);
}

/* ----------------------------------------------------------------------------
   Public update modal shell
---------------------------------------------------------------------------- */
.update-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:16px;
}

.update-modal[hidden]{
  display:none !important;
}

.update-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.76);
}

.update-modal__dialog{
  position:relative;
  z-index:1;
  width:min(1120px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  background:#0e0e0e;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 30px 70px rgba(0,0,0,.48);
  overflow:hidden;
}

.update-modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:52px;
  padding:10px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}

.update-modal__head h3{
  margin:0;
  font-size:.9rem;
  color:#fff;
  font-weight:800;
}

.update-modal__close{
  appearance:none;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.03);
  color:#fff;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  font-size:1rem;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, transform .15s ease;
}

.update-modal__close:hover{
  border-color:rgba(239,207,114,.30);
  background:rgba(255,255,255,.06);
  transform:translateY(-1px);
}

.update-modal__body{
  min-height:0;
  overflow:auto;
  padding:0;
}

.update-modal__article{
  display:grid;
  gap:0;
}

.update-modal__hero{
  width:100%;
  aspect-ratio:16 / 9;
  background:#0b0b0b;
  overflow:hidden;
}

.update-modal__hero img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.update-modal__content{
  display:grid;
  gap:18px;
  padding:22px 22px 26px;
}

.update-modal__meta-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.update-modal__meta-group{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.update-modal__meta{
  margin:0;
  color:var(--gold-soft);
  font-size:.8rem;
  line-height:1.2;
}

.update-modal__author{
  margin:0;
  color:var(--red-bright);
  font-size:.8rem;
  line-height:1.2;
  font-weight:700;
}

.update-modal__share{
  flex:0 0 auto;
}

.update-modal__content h2{
  margin:0;
  color:#fff;
  font-size:1.7rem;
  line-height:1.08;
}

.update-modal__body-copy{
  color:var(--text);
  line-height:1.65;
}

.update-modal__body-copy p:first-child{
  margin-top:0;
}

.update-modal__body-copy p:last-child{
  margin-bottom:0;
}

.update-modal__actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding-top:2px;
  border-top:1px solid rgba(255,255,255,.08);
}

.update-modal__comment-count{
  color:var(--muted);
  font-size:.84rem;
}

/* ----------------------------------------------------------------------------
   Public comments
---------------------------------------------------------------------------- */
.update-modal__comments{
  display:grid;
  gap:16px;
  padding-top:6px;
  border-top:1px solid rgba(255,255,255,.08);
}

.update-modal__comments h3{
  margin:0;
  color:#fff;
  font-size:1rem;
  line-height:1.2;
}

.update-modal__root-form{
  display:grid;
  gap:10px;
}

.update-modal__comment-list{
  display:grid;
  gap:14px;
}

.updates-public__comment{
  display:grid;
  gap:8px;
  padding:12px 12px 14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
}

.updates-public__comment-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.updates-public__comment-head strong{
  color:#fff;
  font-size:.86rem;
  line-height:1.2;
}

.updates-public__comment-head span{
  color:var(--muted);
  font-size:.75rem;
  line-height:1.2;
}

.updates-public__comment-body{
  color:var(--text);
  font-size:.9rem;
  line-height:1.55;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.updates-public__comment-tools{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.updates-public__comment-tags{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.updates-public__comment-tag{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 7px;
  border:1px solid rgba(239,207,114,.18);
  background:rgba(239,207,114,.06);
  color:var(--gold-soft);
  font-size:.72rem;
}

.updates-public__replies{
  display:grid;
  gap:12px;
  margin-top:4px;
  margin-left:18px;
  padding-left:14px;
  border-left:1px solid rgba(255,255,255,.10);
}

.updates-public__reply-slot,
.updates-public__edit-slot{
  margin-top:8px;
}

/* ----------------------------------------------------------------------------
   Public comment composer + edit state
---------------------------------------------------------------------------- */
.updates-public__comment-form{
  display:grid;
  gap:8px;
}

.updates-public__composer-wrap{
  position:relative;
}

.updates-public__composer{
  min-height:108px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.03);
  color:var(--text);
  line-height:1.55;
  outline:none;
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.updates-public__composer:focus{
  border-color:rgba(239,207,114,.30);
  box-shadow:0 0 0 1px rgba(239,207,114,.12);
}

.updates-public__composer:empty::before{
  content:attr(data-placeholder);
  color:var(--muted);
  pointer-events:none;
}

.updates-public__comment-form-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
}

.updates-public__comment-login-note{
  padding:10px 12px;
  border:1px dashed rgba(255,255,255,.12);
  color:var(--muted);
  background:rgba(255,255,255,.02);
}

/* ----------------------------------------------------------------------------
   Inline mention tagging
---------------------------------------------------------------------------- */
.updates-public__inline-tag{
  display:inline;
  color:var(--red-bright);
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-decoration-color:var(--red-bright);
  font-weight:700;
}

.updates-public__mention-menu{
  position:absolute;
  left:0;
  right:auto;
  top:calc(100% + 6px);
  min-width:260px;
  max-width:min(420px, 100%);
  max-height:220px;
  overflow:auto;
  display:grid;
  gap:4px;
  padding:6px;
  border:1px solid rgba(255,255,255,.14);
  background:#111;
  box-shadow:0 16px 28px rgba(0,0,0,.34);
  z-index:30;
}

.updates-public__mention-option{
  appearance:none;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  width:100%;
  min-height:34px;
  padding:7px 9px;
  border:1px solid transparent;
  background:rgba(255,255,255,.03);
  color:var(--text);
  text-align:left;
  cursor:pointer;
  transition:border-color .14s ease, background .14s ease;
}

.updates-public__mention-option:hover{
  border-color:rgba(239,207,114,.22);
  background:rgba(255,255,255,.06);
}

/* ----------------------------------------------------------------------------
   Blocked phrase feedback
---------------------------------------------------------------------------- */
.updates-public__comment-blocked{
  display:grid;
  gap:6px;
  padding:10px 12px;
  border:1px solid rgba(159,23,23,.55);
  background:linear-gradient(180deg, rgba(159,23,23,.16), rgba(159,23,23,.08));
}

.updates-public__comment-blocked-title{
  color:#fff;
  font-size:.74rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.updates-public__comment-blocked-message{
  color:var(--gold-soft);
  font-size:.8rem;
  line-height:1.35;
}

.updates-public__comment-blocked-preview{
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.10);
  background:#0c0c0c;
  color:var(--text);
  font-size:.85rem;
  line-height:1.5;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.bl-banned-hit{
  display:inline;
  padding:0 2px;
  background:rgba(159,23,23,.28);
  color:#fff;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-decoration-color:var(--gold-soft);
}

/* ----------------------------------------------------------------------------
   Hidden-state hard stops
---------------------------------------------------------------------------- */
.updates-public__comment-blocked[hidden],
.updates-public__comment-blocked-preview[hidden],
.updates-public__mention-menu[hidden],
.updates-public__reply-slot[hidden],
.updates-public__edit-slot[hidden]{
  display:none !important;
}

/* ----------------------------------------------------------------------------
   Shared text-link behavior
---------------------------------------------------------------------------- */
.text-link{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--gold-soft);
  padding:0;
  font:inherit;
  cursor:pointer;
  text-decoration:none;
}

.text-link:hover{
  color:#fff;
  text-decoration:underline;
}

/* ----------------------------------------------------------------------------
   Page state when modal open
---------------------------------------------------------------------------- */
body.has-update-modal{
  overflow:hidden;
}

/* ----------------------------------------------------------------------------
   Responsive
---------------------------------------------------------------------------- */
@media (max-width:980px){
  .updates-public__feature-card{
    grid-template-columns:1fr;
  }

  .updates-public__rail{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .update-modal{
    padding:10px;
  }

  .update-modal__dialog{
    width:calc(100vw - 20px);
    max-height:calc(100vh - 20px);
  }

  .update-modal__content{
    padding:18px 16px 20px;
  }

  .update-modal__content h2{
    font-size:1.35rem;
  }

  .update-modal__meta-row{
    align-items:flex-start;
  }
}

@media (max-width:640px){
  .updates-public__rail{
    grid-template-columns:1fr;
  }

  .updates-public__comment-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .updates-public__replies{
    margin-left:10px;
    padding-left:10px;
  }

  .updates-public__mention-menu{
    min-width:100%;
    max-width:100%;
  }
}