/* Newsbot rail: an in-page column, visible by default and independently scrollable. */
.news-rail-layout {
  display: block;
  min-width: 0;
  width: 100%;
}
.news-rail-layout.is-news-open {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(20rem, 25vw, 25rem);
  margin: 0 auto;
  max-width: 1680px;
}
.news-rail-layout > main {
  min-width: 0;
  width: 100%;
}
.news-rail-toggle {
  align-items: center;
  background: var(--ink, #171614);
  border: 0;
  border-left: 3px solid var(--accent, #9f1d2b);
  color: #fffaf1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  justify-content: center;
  min-height: 116px;
  min-width: 48px;
  padding: .8rem .55rem;
  position: fixed;
  right: 0;
  top: 42%;
  transform: translateY(-50%);
  z-index: 1080;
}
.news-rail-toggle[hidden],
.news-rail[hidden] { display: none !important; }
.news-rail-toggle-label {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.news-rail-toggle-mark {
  border-top: 1px solid rgba(255,255,255,.45);
  font-family: Georgia, serif;
  font-size: .7rem;
  padding-top: .4rem;
}
.news-rail-toggle:hover { background: var(--accent, #9f1d2b); }
.news-rail-toggle:focus-visible,
.news-rail-close:focus-visible,
.news-rail-retry:focus-visible,
.news-rail-headline:focus-visible {
  outline: 3px solid #2f6fea;
  outline-offset: 3px;
}
.news-rail {
  background:
    linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)),
    var(--paper, #f3efe7);
  border-left: 1px solid var(--rule-strong, #a99c88);
  color: var(--ink, #171614);
  max-height: calc(100dvh - 8.25rem);
  overflow-y: auto;
  padding: clamp(1.1rem, 2.2vw, 1.7rem);
  position: sticky;
  top: 7.25rem;
}
.news-rail-header {
  align-items: start;
  background: transparent;
  border-bottom: 4px double var(--ink, #171614);
  box-shadow: none;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 1rem;
  position: static;
  top: auto;
  z-index: auto;
}
.news-rail-kicker {
  color: var(--accent, #9f1d2b);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .14em;
  margin: 0 0 .35rem;
  text-transform: uppercase;
}
.news-rail-heading h2 {
  font-family: Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1;
  margin: 0;
}
.news-rail-close,
.news-rail-retry {
  background: transparent;
  border: 1px solid var(--rule-strong, #a99c88);
  color: var(--ink, #171614);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
  min-height: 44px;
  min-width: 44px;
  padding: .65rem;
  text-transform: uppercase;
}
.news-rail-close:hover,
.news-rail-retry:hover { background: var(--ink, #171614); color: #fffaf1; }
.news-rail-sources,
.news-rail-status,
.news-rail-foot {
  color: var(--muted-ink, #6f685e);
  font-size: .72rem;
  line-height: 1.5;
}
.news-rail-sources {
  border-bottom: 1px solid var(--rule, #d4cab9);
  letter-spacing: .04em;
  margin: 0;
  padding: .8rem 0;
  text-transform: uppercase;
}
.news-rail-status { margin: 0; padding: .8rem 0; }
.news-rail-list {
  border-top: 1px solid var(--ink, #171614);
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-rail-item {
  border-bottom: 1px solid var(--rule, #d4cab9);
  padding: .9rem 0 1rem;
}
.news-rail-meta {
  align-items: baseline;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-bottom: .42rem;
}
.news-rail-source {
  color: var(--accent, #9f1d2b);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
}
.news-rail-time {
  color: var(--muted-ink, #6f685e);
  flex: 0 0 auto;
  font-size: .62rem;
  font-variant-numeric: tabular-nums;
}
.news-rail-headline {
  color: var(--ink, #171614);
  display: block;
  font-family: Georgia, serif;
  font-size: 1.03rem;
  line-height: 1.3;
  min-height: 44px;
  text-decoration-color: var(--rule-strong, #a99c88);
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}
.news-rail-headline:hover { color: var(--accent, #9f1d2b); }
.news-rail-retry { margin: 1rem 0; }
.news-rail-foot {
  border-top: 4px double var(--ink, #171614);
  margin: 1.25rem 0 0;
  padding-top: .9rem;
}

@media (max-width: 1100px) {
  .news-rail-layout.is-news-open {
    grid-template-areas:
      "rail"
      "content";
    grid-template-columns: minmax(0, 1fr);
  }
  .news-rail-layout > main { grid-area: content; }
  .news-rail {
    border-bottom: 4px double var(--ink, #171614);
    border-left: 0;
    grid-area: rail;
    margin: 0 auto;
    max-height: 44dvh;
    max-width: 1240px;
    position: relative;
    top: auto;
    width: 100%;
  }
}
@media (max-width: 640px) {
  .news-rail-toggle {
    bottom: .75rem;
    flex-direction: row;
    gap: .6rem;
    min-height: 48px;
    padding: .7rem .9rem;
    right: .75rem;
    top: auto;
    transform: none;
  }
  .news-rail-toggle-label { writing-mode: horizontal-tb; }
  .news-rail-toggle-mark {
    border-left: 1px solid rgba(255,255,255,.45);
    border-top: 0;
    padding-left: .6rem;
    padding-top: 0;
  }
  .news-rail {
    max-height: 42dvh;
    padding: 1rem 1.25rem;
  }
  .news-rail-headline { font-size: 1rem; }
}
@media print {
  .news-rail-toggle, .news-rail { display: none !important; }
  .news-rail-layout.is-news-open { display: block; }
}

