/* Styles for all articles and legal pages */
.main-footer {
  background-color: var(--bg-offset);
  border-top: 1px solid var(--border-color);
}
.article-hero {
  padding: 180px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.article-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.article-meta span {
  color: var(--text-primary);
  font-weight: 600;
}
.article-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.article-body {
  padding: 60px 20px 120px;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.article-body h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}
.article-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-2);
}
.article-body p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.article-body a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  transition:
    color 0.2s ease,
    text-decoration 0.2s ease;
}
.article-body a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.article-body blockquote {
  border-left: 4px solid var(--accent-2);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-primary);
}
.article-body .email-callout {
  margin: 2rem 0 2.5rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #facc15;
  border-radius: 8px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.article-body .email-callout summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.article-body .email-callout summary::-webkit-details-marker {
  display: none;
}
.article-body .email-callout summary::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: #f8df6a;
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 999px;
  flex: 0 0 auto;
}
.article-body .email-callout[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.article-body .email-callout[open] summary::after {
  content: '-';
}
.article-body .email-callout > :not(summary) {
  margin-left: 1.4rem;
  margin-right: 1.4rem;
}
.article-body .email-callout > :nth-child(2) {
  margin-top: 1.25rem;
}
.article-body .email-callout > :last-child {
  margin-bottom: 1.25rem;
}
.article-body .email-callout p,
.article-body .email-callout li {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.article-body .email-callout p:last-child {
  margin-bottom: 0;
}
.article-body .email-callout ul {
  margin-top: -0.4rem;
}
.article-body .email-callout strong {
  color: #f8df6a;
}
.article-body pre {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.article-body code {
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--surface);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
.article-body pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  color: var(--text-secondary); /* Specific for preformatted code in articles */
}
.article-body ul {
  list-style-type: disc;
  padding-left: 25px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.article-body li::marker {
  color: var(--accent-2);
}
.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.article-body .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}
.article-body .back-link::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M9 3l-4 4 4 4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M9 3l-4 4 4 4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/contain no-repeat;
}
.article-body .back-link:hover {
  transform: translateX(-4px);
}
.article-body .credits {
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

/* Pull quotes */
.pull-quote {
  border-left: 3px solid var(--accent, #a78bfa);
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  background: rgba(167, 139, 250, 0.06);
  border-radius: 0 8px 8px 0;
}
.pull-quote p {
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.7;
  margin: 0;
  color: var(--text-muted, #c4b5fd);
}
.pull-quote cite {
  display: block;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* Breach tracker table */
.breach-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.2);
}
.breach-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 0;
}
.breach-table thead {
  background: rgba(167, 139, 250, 0.15);
}
.breach-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(167, 139, 250, 0.25);
}
.breach-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  line-height: 1.5;
  color: var(--text-secondary);
}
.breach-table td p {
  margin: 0;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}
.breach-table tr:last-child td {
  border-bottom: none;
}
.breach-table tr:hover td {
  background: rgba(167, 139, 250, 0.04);
}
.breach-table .severity-critical {
  color: #f87171;
  font-weight: 600;
}
.breach-table .severity-high {
  color: #fb923c;
  font-weight: 600;
}

/* Lobbying timeline */
.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(167, 139, 250, 0.8), rgba(167, 139, 250, 0.1));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent, #a78bfa);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}
.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #a78bfa);
  margin-bottom: 0.3rem;
}
.timeline-item p {
  margin: 0;
}

/* Source citation chip */
.source-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15em 0.55em;
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.15);
  color: var(--accent, #a78bfa);
  text-decoration: none;
  margin-left: 0.3em;
  vertical-align: middle;
  transition: background 0.2s;
}
.source-chip:hover {
  background: rgba(167, 139, 250, 0.3);
  text-decoration: none;
}

/* Code/snippet block */
.evidence-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #a3e6b5;
  overflow-x: auto;
}
.evidence-block p {
  margin: 0;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}
.evidence-block .comment {
  color: #6b7280;
  font-style: italic;
}
.evidence-block .key {
  color: #93c5fd;
}
.evidence-block .val {
  color: #fcd34d;
}

/* Warning callout */
.callout-warning {
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.callout-warning p:last-child {
  margin-bottom: 0;
}
.callout-warning strong {
  color: #fb923c;
}

/* Section label */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #a78bfa);
  margin-bottom: 0.5rem;
  display: block;
}

/* Text to Speech word highlight */
::highlight(tts-highlight) {
  background-color: rgba(167, 139, 250, 0.4);
  color: #ffffff;
  border-radius: 2px;
}

/* Fallback highlight for unsupported browsers */
.article-body .tts-active-block {
  background-color: rgba(167, 139, 250, 0.1);
  border-left: 3px solid var(--accent, #a78bfa);
  padding-left: 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}
