/* Four boxes under the last "Advertise Here" box (sidebar_extras.py, Dec. 1, 2026):
   Message of the Day, This Weekend, Local Deals, Ask a Local.
   Today's Poll stays only at the top of the sidebar. Same look as Local Listings
   and the comments card: paper card, gold border, navy head with a gold rule,
   River Fox mark. */

/* Wide screens: the sidebar column runs the full height of the page, the last
   block grows to the bottom, and js/sidebar-extras.js sizes or pins the stack. */
@media (min-width: 1024px) {
  .page-shell > .sidebar { align-self: stretch; display: flex; flex-direction: column; }
  .page-shell > .sidebar > .sidebar-stack { flex: 1 1 auto; }
  .sidebar-stack > .side-extras { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
}
.side-extras { margin: 0; min-width: 0; grid-column: 1 / -1; }
.side-extras__stick { display: flex; flex-direction: column; gap: 1rem; flex: 0 0 auto; }
@media (min-width: 1024px) {
  .side-extras__stick.is-filled { flex: 1 1 auto; }
  .side-extras__stick.is-filled > .sx-card { flex: 1 1 auto; }
  .side-extras__stick.is-sticky { position: -webkit-sticky; position: sticky; top: calc(var(--header-h, 4.25rem) + 1rem); align-self: flex-start; width: 100%; }
}

.sx-card {
  display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden;
  background: var(--paper); border: 2px solid var(--gold); border-radius: var(--radius, 14px);
  box-shadow: 0 10px 26px rgba(11, 61, 92, 0.08);
}
.sx-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.5rem 0.9rem 0.45rem; background: var(--navy); border-bottom: 3px solid var(--gold);
}
.sx-kicker {
  margin: 0 0 0.12rem; font: 700 0.66rem/1.2 var(--font-ui); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-on-navy, #E0C45A);
}
.sx-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; letter-spacing: -0.02em; color: #FFFCF7; }
.sx-mark { flex: none; width: 28px; height: 28px; padding: 3px; border-radius: 8px; background: #FFFCF7; box-sizing: border-box; }

.sx-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; padding: 0.6rem 0.9rem 0.45rem; min-width: 0; }
.sx-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
  margin: 0; padding: 0.3rem 0.9rem 0.5rem; border-top: 1px solid var(--card-border);
}
.sx-foot__note { font: 600 0.74rem/1.3 var(--font-ui); color: var(--muted); }
.sx-more {
  display: inline-flex; align-items: center; gap: 0.25rem; min-height: 32px; margin-left: auto;
  font: 700 0.84rem/1.2 var(--font-ui); color: var(--navy); text-decoration: none;
}
.sx-more span { color: var(--gold-text); transition: transform 0.15s ease; }
.sx-more:hover { color: var(--navy-deep); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.sx-more:hover span { transform: translateX(3px); }
.sx-more:focus-visible, .sx-ev a:focus-visible, .sx-deal a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
@media (pointer: coarse) { .sx-more { min-height: 44px; } }

/* Message of the Day */
.sx-quote { margin: 0; padding: 0 0 0 0.75rem; border-left: 3px solid var(--gold); }
.sx-quote p { margin: 0; font-family: var(--font-display); font-weight: 400; font-style: italic; font-size: 1.02rem; line-height: 1.4; color: var(--navy); }
.sx-quote__by { margin: 0; padding-left: 0.75rem; font: 600 0.84rem/1.3 var(--font-ui); color: var(--gold-text); }

/* This Weekend */
.sx-body--list { justify-content: space-between; gap: 0.5rem; }
.sx-town { min-width: 0; }
.sx-town + .sx-town { margin-top: 0.5rem; }
.sx-town__name {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.3rem; padding: 0;
  font: 700 0.88rem/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--navy); text-align: left;
}
.sx-town__name::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--gold); opacity: 0.9; }
.sx-ev { list-style: none; margin: 0; padding: 0; }
.sx-ev li { display: flex; flex-direction: column; padding: 0.22rem 0; }
.sx-ev li + li { border-top: 1px dotted var(--light-line); }
.sx-ev__title {
  font: 600 0.88rem/1.25 var(--font-ui); color: var(--navy);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sx-ev a { color: inherit; text-decoration: none; }
.sx-ev a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 2px; }
.sx-ev__meta { font: 500 0.74rem/1.3 var(--font-ui); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-ev--none { font: 500 0.8rem/1.3 var(--font-ui); color: var(--muted); }

/* Local Deals and Ask a Local */
.sx-empty { margin: 0; font: 500 0.88rem/1.4 var(--font-ui); color: var(--navy); text-align: left; }
.sx-deal { padding: 0.28rem 0; min-width: 0; }
.sx-deal + .sx-deal { border-top: 1px dotted var(--light-line); }
.sx-deal__kicker { display: block; font: 700 0.64rem/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-text); }
.sx-deal__offer { display: block; font: 700 0.92rem/1.25 var(--font-ui); color: var(--navy); overflow-wrap: anywhere; }
.sx-deal__biz { display: block; font: 500 0.78rem/1.3 var(--font-ui); color: var(--muted); }
.sx-deal a { color: inherit; text-decoration: none; }
.sx-deal a:hover .sx-deal__offer { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 2px; }
.sx-ask__q { margin: 0; padding: 0; font: 600 0.95rem/1.4 var(--font-ui); color: var(--navy); text-align: left;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sx-ask__by { margin: 0; padding: 0; font: 500 0.78rem/1.3 var(--font-ui); color: var(--muted); text-align: left; }

@media (prefers-reduced-motion: reduce) { .sx-more span { transition: none; } }

/* Tablets: pair the short boxes so the stack stays compact and even. */
@media (min-width: 700px) and (max-width: 1023px) {
  .side-extras__stick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .side-extras__stick > .sx-card--motd,
  .side-extras__stick > .sx-card--weekend { grid-column: 1 / -1; }
}
.sx-card[hidden] { display: none; }
