/* Preview news index, story, and inline admin. Values follow live nws.min.css. */

main:has(.news-page),
main:has(.news-article) {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--page-px) 7rem;
  min-width: 0;
}
@media (min-width: 768px) {
  main:has(.news-page),
  main:has(.news-article) {
    padding: 24px 32px 4rem;
  }
}

.news-kicker {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #595959;
}
.news-page h1,
.news-login h1 {
  margin: 8px 0 0;
  color: #111;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
  text-wrap: balance;
}
@media (min-width: 640px) {
  .news-page h1,
  .news-login h1 { font-size: 3rem; }
}

.news-index {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
}
.news-index li {
  position: relative;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.news-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.news-row-media {
  flex: 0 0 160px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17,17,17,.06), 0 0 0 1px rgba(17,17,17,.08);
}
@media (min-width: 768px) {
  .news-row-media { flex-basis: 336px; }
}
.news-row-media .art {
  display: block;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--well);
}
.news-row-media .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-thumb-ph {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--well);
}
.news-row-copy { min-width: 0; flex: 1; }
.news-row h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.025em;
  color: #111;
  line-height: 1.25;
  text-wrap: balance;
}
@media (min-width: 640px) {
  .news-row h3 { font-size: 1.5rem; line-height: 32px; }
}
.news-row-dek {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
  text-wrap: pretty;
}
.news-row-date {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: #6b6b6b;
}

.news-article { max-width: 72rem; }
.news-date {
  margin: 20px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #595959;
}
.news-article h1 {
  margin: 8px 0 0;
  width: 100%;
  color: var(--red);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
  text-wrap: balance;
}
@media (min-width: 640px) {
  .news-article h1 { font-size: 3rem; }
}
.news-hero {
  width: 100%;
  height: auto;
  max-height: 820px;
  object-fit: contain;
  object-position: center;
  background: #111;
  border-radius: 24px;
  display: block;
  margin-top: 20px;
}
.news-dek {
  margin: 16px 0 0;
  width: 100%;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
  text-wrap: pretty;
}
.news-body {
  margin-top: 32px;
  width: 100%;
  max-width: none;
  font-size: 1rem;
  line-height: 1.625;
  color: #111;
}
.news-body p { margin: 0 0 16px; text-wrap: pretty; }
.news-body a { color: var(--red); font-weight: 600; }
.news-body a:hover { text-decoration: underline; }
.news-body img { width: 100%; height: auto; }
.news-body strong, .news-body b { font-weight: 600; }
.news-more { margin: 32px 0 0; }
.btn.read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
}
.btn.read-more:hover { filter: brightness(.95); color: #fff; }
.all-news { margin-top: 40px; }
.all-news a { font-size: 14px; font-weight: 500; color: #595959; }
.all-news a:hover { color: #111; }

.share-story {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.share-story p { margin: 0; flex-shrink: 0; font-size: 14px; color: #595959; }
.share-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 3px;
  background: #111;
  color: #fff;
}
.share-ico:hover { opacity: .8; }
.share-ico img,
.share-ico svg { width: 16px; height: 16px; max-width: 16px; max-height: 16px; display: block; object-fit: contain; }
/* Wide wordmarks (same sizing as the home share row): never crop Gab ("jab") or MeWe into a 16px square. */
.share-ico.gab img,
.share-ico.mewe img { width: 26px; height: 14px; max-width: 26px; max-height: 14px; object-fit: contain; }

.admin-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 1px 4px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.08);
  cursor: pointer;
}
.admin-edit-btn:hover { background: #111; color: #fff; }
.news-index li > .admin-edit-btn { top: 8px; right: 0; }
.show-title-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 0;
}
.show-title-row .admin-edit-btn { position: static; flex-shrink: 0; margin-top: 8px; }

.news-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0 0;
}
.news-login-lede { margin: 16px 0 0; max-width: 42rem; color: var(--muted); }
.news-admin-actions { margin: 24px 0 0; }
.news-admin-msg { margin: 12px 0 0; color: var(--red); font-size: 14px; }
.news-admin-msg.ok { color: #1a7f37; }

.edit-form, .news-inline-form {
  margin: 20px 0 0;
  display: grid;
  gap: 12px;
  max-width: 48rem;
}
.edit-form h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.edit-form label, .photo-drop-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
.edit-form input, .edit-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.edit-form textarea { resize: vertical; }
.grant-row {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .grant-row { grid-template-columns: 1fr 1fr; }
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(.95); color: #fff; }
.btn.ghost {
  background: #fff;
  color: #111;
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.ghost:hover { background: var(--well); color: #111; filter: none; }

.photo-drop-label { margin: 12px 0 8px; font-size: 14px; font-weight: 500; color: #888; }
.photo-drop {
  border: 1px dashed #ccc;
  border-radius: 28px;
  background: #f7f7f7;
  text-align: center;
  overflow: hidden;
}
.photo-drop label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 148px;
  padding: 28px 16px;
  cursor: pointer;
  color: #333;
}
.photo-drop.over { border-color: #111; background: #eee; }
.photo-drop img { display: block; width: 100%; max-height: 280px; object-fit: contain; background: #111; }
.photo-drop img[hidden] { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.meme-drop-lead { font-weight: 600; }
.meme-choose { color: var(--red); font-weight: 600; text-decoration: underline; }

.news-url-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.news-url-prefix { color: #888; font-size: 14px; white-space: nowrap; }
.news-url-row input { flex: 1; margin-top: 0; min-width: 0; }
.news-url-status { flex: 0 0 auto; min-width: 1.25em; font-size: 15px; }
.news-url-status.ok { color: #1a7f37; font-size: 20px; font-weight: 700; }
.news-url-status.bad { color: #c4121a; font-size: 13px; font-weight: 700; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 28px;
  font-size: 14px;
}
.pager a, .pager .pager-off, .pager-status { margin-right: 8px; }
.pager a { font-weight: 600; color: #111; }
.pager a:hover { color: var(--red); text-decoration: underline; }
.pager-off { color: #aaa; }

.nav-pages > a[aria-current="page"] { color: var(--red); }

@media (max-width: 639px) {
  .news-row { flex-direction: column; }
  .news-row-media { flex-basis: auto; width: 100%; }
}

/* Share row on each news index card (shares that story's own URL). Compact boxes; Gab/MeWe keep wide-wordmark sizing. */
.news-card-share { margin-top: 12px; gap: 8px; }
.news-card-share p { font-size: 13px; }
.news-card-share .share-icons { gap: 6px; }
.news-card-share .share-ico { width: 36px; height: 36px; }
@media (max-width: 480px) {
  /* Phones: keep the article's 8 share icons on one line (same compact size as the index cards). */
  .news-article .share-icons { gap: 6px; }
  .news-article .share-ico { width: 36px; height: 36px; }
}
