/* Shared feed layout styling for faq.html and news.html
   Extracted from inline <style> blocks so CSP style-src can drop 'unsafe-inline'. */

.faq-main,
.news-main {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(2rem, 5vw, 3rem);
}

.faq-feed,
.news-feed {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3rem);
}

.faq-entry,
.news-entry {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

/* Defer layout/paint for below-the-fold cards on long feed pages while keeping text searchable */
.faq-entry:nth-of-type(n+4),
.news-entry:nth-of-type(n+4),
.news-archive-section {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 280px;
}

.faq-entry:hover,
.news-entry:hover {
  border-color: rgba(var(--gold-rgb), 0.25);
}

.faq-question,
.news-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1.35;
  text-wrap: balance;
}

.faq-answer,
.news-body {
  font-family: var(--font-body);
  font-size: clamp(0.93rem, 2.2vw, 1rem);
  line-height: 1.75;
  color: var(--muted);
}

.faq-answer p,
.news-body p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.faq-answer p:last-child,
.news-body p:last-child {
  margin-bottom: 0;
}

.faq-answer strong,
.news-body strong {
  color: var(--white);
  font-weight: 600;
}

.faq-answer a,
.news-body a {
  color: var(--gold-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.faq-answer a:hover,
.news-body a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

.faq-divider,
.news-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0;
}

/* --- Shared Share Button & Tooltip --- */
.faq-share-btn,
.news-share-btn {
  position: absolute;
  top: clamp(1rem, 2.5vw, 1.5rem);
  right: clamp(1rem, 2.5vw, 1.5rem);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-share-btn:hover,
.news-share-btn:hover {
  background: rgba(var(--gold-rgb), 0.15);
  border-color: rgba(var(--gold-rgb), 0.4);
  color: var(--gold-text);
  transform: scale(1.05);
}

.faq-share-btn:focus-visible,
.news-share-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.faq-share-btn:active,
.news-share-btn:active {
  transform: scale(0.95);
}

.faq-share-btn.copied,
.news-share-btn.copied {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.copied-tooltip {
  position: absolute;
  bottom: 100%;
  right: 50%;
  transform: translateX(50%) translateY(-6px);
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-share-btn.copied .copied-tooltip,
.news-share-btn.copied .copied-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(50%) translateY(-10px);
}

/* --- FAQ Specific --- */
.faq-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.65rem;
}

.faq-tag-setup {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.faq-tag-troubleshoot {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.faq-tag-gameplay {
  background: rgba(var(--gold-rgb), 0.15);
  color: var(--gold-text);
  border: 1px solid rgba(var(--gold-rgb), 0.25);
}

.faq-steps {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
  counter-reset: faq-step;
  list-style: none;
}

.faq-steps li {
  margin-bottom: 0.5rem;
  counter-increment: faq-step;
  position: relative;
  padding-left: 0.25rem;
}

.faq-steps li::before {
  content: counter(faq-step) ".";
  position: absolute;
  left: -1.25rem;
  color: var(--gold-text);
  font-weight: 600;
}

.faq-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.faq-list li {
  margin-bottom: 0.4rem;
}

.faq-list-tight {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.faq-toc {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 2.5vw, 1.25rem);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.faq-toc-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 0.5rem;
}

.faq-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.faq-toc-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.faq-toc-list a:hover {
  color: var(--gold-text);
}

.faq-toc-list a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

.faq-callout {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: rgba(var(--gold-rgb), 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.faq-callout strong {
  color: var(--gold-text);
}

.ios-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 1.15rem;
  height: 1.15rem;
  color: #60a5fa;
  background: rgba(0, 122, 255, 0.14);
  padding: 2.5px;
  border-radius: 4px;
  margin: 0 0.2rem;
  position: relative;
  top: -1px;
}

.faq-inline-reporter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  padding: 2.5px;
  border-radius: 50%;
  margin: 0 0.2rem;
  position: relative;
  top: -1px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --- News Specific --- */
.news-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.news-title-row .page-title,
.news-page-sub {
  margin: 0;
}

.news-date {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 0.65rem;
}

.news-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  margin-right: 0.4rem;
}

.news-tag-update {
  background: rgba(26, 48, 112, 0.6);
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.news-tag-milestone {
  background: rgba(var(--gold-rgb), 0.15);
  color: var(--gold-text);
  border: 1px solid rgba(var(--gold-rgb), 0.25);
}

.news-tag-feature {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.news-tag-bugfix {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.news-closing {
  color: var(--white);
  font-weight: 500;
  font-style: italic;
}

.news-signature {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  font-style: italic;
}

.news-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.news-list li {
  margin-bottom: 0.4rem;
}

.news-archive-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.archive-section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  margin: 0 0 0.25rem;
  text-transform: uppercase;
}

.news-archive-month {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.news-archive-month:hover {
  border-color: rgba(var(--gold-rgb), 0.25);
  background-color: rgba(255, 255, 255, 0.035);
}

.news-archive-month[open] {
  border-color: rgba(var(--gold-rgb), 0.3);
  background-color: rgba(255, 255, 255, 0.025);
}

.news-archive-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--white);
  cursor: pointer;
  user-select: none;
}

.news-archive-month-header:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  border-radius: 6px;
}

.news-archive-month-header::-webkit-details-marker,
.news-archive-month-header::marker {
  display: none;
}

.news-archive-month-header .month-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.news-archive-month-header .post-count {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0;
  text-transform: none;
}

.news-archive-month-header .chevron-icon {
  color: rgba(255, 255, 255, 0.58);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.news-archive-month-header:hover .chevron-icon {
  color: var(--gold-text);
}

.news-archive-month[open] .chevron-icon {
  transform: rotate(180deg);
  color: var(--gold-text);
}

.news-month-feed {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.12);
}

.news-archive {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 2.5vw, 1.25rem);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.news-archive-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin: 1.2rem 0 0.5rem;
}

.news-archive-title:first-child {
  margin-top: 0;
}

.news-archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.news-archive-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
}

.news-archive-date {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  min-width: 5.5em;
}

.news-archive-count {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 0.4rem;
}

.news-archive-list a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-archive-list a:hover {
  color: var(--gold-text);
}

.news-archive-list a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

.rss-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.2s ease, transform 0.2s ease;
}

.rss-link:hover {
  color: #ff9100;
  transform: scale(1.1);
}

.inline-theme-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  margin: 0 0.1em;
  stroke: currentColor;
}
