/* ── Pull-to-refresh indicator ── */
.ptr-indicator {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s;
  z-index: 999;
  pointer-events: none;
}
.ptr-indicator.refreshing {
  transform: scaleX(1);
  animation: ptr-pulse 0.6s ease-in-out infinite alternate;
}
@keyframes ptr-pulse { from { opacity: 1; } to { opacity: 0.3; } }

/* ── Font size classes ── */
.font-small #content { font-size: 0.85rem; }
.font-small #content p, .font-small #content li { font-size: 0.85rem; }
.font-large #content { font-size: 1.15rem; }
.font-large #content p, .font-large #content li { font-size: 1.15rem; }
.font-large #content h1 { font-size: 1.7rem; }
.font-large #content h3 { font-size: 1.15rem; }
.font-serif #content { font-family: Georgia, 'Times New Roman', Times, serif; }
.font-serif #content h1, .font-serif #content h2, .font-serif #content h3 { font-family: Georgia, 'Times New Roman', Times, serif; }
.font-justify #content p, .font-justify #content li, .font-justify #content .analyst-note { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.story-bluf {
  font-style: italic; font-size: 0.92em; line-height: 1.6;
  color: var(--heading); margin-bottom: 0.5rem;
}
.story-bluf-label { font-weight: 700; font-style: normal; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.3em; }
.analyst-note {
  font-style: normal; font-size: 0.90em; line-height: 1.7;
  border-left: 3px solid var(--analysis-border); background: var(--analysis-bg);
  padding: 0.6rem 0.9rem; margin-bottom: 0.8rem; border-radius: 0 4px 4px 0;
}
.analyst-note-label { font-weight: 600; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.analyst-note.clamped {
  display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; overflow: hidden;
  padding-bottom: 0;
}
.analyst-note-more {
  display: block; color: var(--accent); cursor: pointer; font-size: 0.82rem;
  text-align: right; padding: 0.15rem 0.9rem 0.15rem 0; margin-bottom: 0.8rem;
}
.analyst-note-more:hover { text-decoration: underline; }
#freshness {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#freshness:empty { display: none; }
#freshness .dot { font-size: 0.7rem; margin-right: 0.3rem; }
#content h1, #content h2, #content h3 {
  color: var(--heading);
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  scroll-margin-top: 1rem;
}
#content h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.pdf-download {
  font-size: 0.7rem; font-weight: normal; letter-spacing: 0.03em;
  color: var(--text-muted); text-decoration: none; margin-left: 0.5em;
  border: 1px solid var(--border); border-radius: 3px; padding: 0.15em 0.5em;
  vertical-align: middle;
}
.pdf-download:hover { color: var(--accent); border-color: var(--accent); }
#content h2 { font-size: 1.25rem; }
#content h3 { font-size: 1.1rem; position: relative; }
#content h3 .permalink {
  margin-left: 0.4em; text-decoration: none; color: var(--accent);
  cursor: pointer; transition: color 0.15s; vertical-align: middle;
  display: inline-flex; align-items: center; opacity: 0.7;
}
#content h3 .permalink:hover { opacity: 1; }
#content h3 .permalink:active, #content h3 .permalink.copied { color: var(--fresh-green); opacity: 1; }
#content h3 .permalink svg { width: 16px; height: 16px; }
.permalink-toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 0.5rem 1.2rem;
  border-radius: 6px; font-size: 0.85rem; z-index: 100;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.permalink-toast.show { opacity: 1; }
sp {
  border-bottom: 1px dotted var(--text-muted); cursor: help;
}
sp:hover { border-bottom-color: var(--accent); color: var(--accent); }
sp .sp-tip {
  display: none; position: fixed; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.6rem 0.8rem; font-size: 0.82rem; line-height: 1.5;
  color: var(--text); width: 300px; max-width: calc(100vw - 2rem);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: auto;
}
sp .sp-tip .sp-header { font-weight: 600; margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; font-size: 0.9rem; }
sp .sp-tip .sp-fields { display: flex; flex-direction: column; gap: 0.6rem; }
sp .sp-tip .sp-field { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
sp .sp-tip .sp-label { color: var(--accent); font-weight: 600; display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.1rem; }
ka {
  border-bottom: 1px dotted var(--text-muted); cursor: help;
}
ka:hover { border-bottom-color: var(--accent); color: var(--accent); }
sc {
  color: var(--accent); font-size: 0.65em; vertical-align: super;
  line-height: 0; padding: 0 1px; font-weight: 600; cursor: help;
}
sc:hover { text-decoration: underline; }
sc .sc-tip {
  display: none; position: fixed; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.5rem 0.7rem; font-size: 0.82rem; line-height: 1.4;
  color: var(--text); max-width: 320px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: auto;
}
sc .sc-tip a { color: var(--accent); text-decoration: none; }
sc .sc-tip a:hover { text-decoration: underline; }
rc {
  cursor: pointer; color: var(--accent); font-size: 0.65em; vertical-align: sub;
  line-height: 0; padding: 0 1px; font-weight: 600;
}
rc:hover { text-decoration: underline; }
rc .rc-tip {
  display: none; position: fixed; z-index: 50;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 6px;
  padding: 0.5rem 0.7rem; font-size: 0.82rem; line-height: 1.4;
  color: var(--text); max-width: 320px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: auto;
}
rc .rc-tip a { color: var(--accent); text-decoration: none; }
rc .rc-tip a:hover { text-decoration: underline; }
wep { border-bottom: 1px dashed var(--accent); cursor: help; }
wep:hover { color: var(--accent); }
.wep-tip {
  display: none; position: fixed; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.6rem 0.8rem; font-size: 0.82rem; line-height: 1.5;
  color: var(--text); width: 240px; max-width: calc(100vw - 2rem);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: auto;
  font-style: normal;
}
.wep-tip .wep-field { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 0.2rem; }
.wep-tip .wep-field:last-child { margin-bottom: 0; }
.wep-tip .wep-label { color: var(--accent); font-weight: 600; display: inline; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.3em; }
ka .ka-tip {
  display: none; position: fixed; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.6rem 0.8rem; font-size: 0.82rem; line-height: 1.4;
  color: var(--text); width: 320px; max-width: calc(100vw - 2rem);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: auto;
}
#content p { margin-bottom: 1rem; }
#content ul, #content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
#content li { margin-bottom: 0.3rem; }
#content li a { color: var(--accent); text-decoration: none; }
#content li a:hover { text-decoration: underline; }
#content code {
  background: var(--mono-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}
#content pre {
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
#content pre code { background: none; padding: 0; }
#content blockquote {
  border-left: 3px solid var(--analysis-border);
  background: var(--analysis-bg);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
  font-size: 0.92rem;
}
#content blockquote strong { font-style: normal; }
#content blockquote ul { margin-top: 0.4rem; }
#content a { color: var(--accent); text-decoration: none; }
#content a:hover { text-decoration: underline; }
#content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
#content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
#content th, #content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
#content th {
  background: var(--surface);
  color: var(--heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
#content details {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
}
#content details:not(.archive-month) {
  font-size: 0.90em;
}
#content details:not(.archive-month) li { font-size: inherit; }
#content details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  list-style: none;
}
#content details summary::-webkit-details-marker { display: none; }
#content details summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.4em;
  transition: transform 0.15s;
}
#content details[open] summary::before { transform: rotate(90deg); }
#content details summary:hover { color: var(--text); }
#content details ul, #content details ol { margin-top: 0.5rem; }
#content details p { margin: 0.25rem 0; }
.source-summary-statement {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.5;
  padding: 0.5rem 0.75rem; border-left: 2px solid var(--border);
  margin: 0.5rem 0 1rem 0;
}
.archive-search {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  outline: none;
  transition: border-color 0.15s;
}
.archive-search:focus { border-color: var(--accent); }
.archive-search::placeholder { color: var(--text-muted); }
.search-result {
  display: block;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover .headline { color: var(--accent); }
.search-result .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.search-result .meta span { margin-right: 0.75rem; }
.search-result .headline {
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.2rem;
  transition: color 0.15s;
}
.search-result .snippet {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.search-result mark {
  background: rgba(88,166,255,0.2);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}
[data-theme="light"] .search-result mark {
  background: rgba(9,105,218,0.12);
}
.search-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.archive-table td a { font-weight: 600; }
.archive-month { margin-bottom: 0.25rem; }
.archive-month summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--heading);
  padding: 0.5rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.archive-month summary::-webkit-details-marker { display: none; }
.archive-month summary::before {
  content: '▸';
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.15s;
}
.archive-month[open] summary::before { transform: rotate(90deg); }
.archive-month .count {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}
.archive-days { padding: 0 0 0.5rem 0; }
.archive-day {
  display: flex;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.archive-day:last-child { border-bottom: none; }
.archive-day .day-num {
  width: 2.5rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.archive-day .day-cols {
  display: flex;
  flex: 1;
  gap: 0;
}
.archive-col {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  align-items: baseline;
}
.archive-col-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 0.1rem;
}
.archive-entry {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.archive-entry:hover { text-decoration: underline; }
.archive-header { border-bottom: 1px solid var(--border); padding-bottom: 0.2rem; }
.archive-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
}
.archive-back:hover { text-decoration: underline; }
.top-stories {
  margin-bottom: 1.5rem;
}
.top-stories h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.top-stories ol {
  list-style: none;
  counter-reset: top-rank;
  padding: 0;
}
.top-stories li {
  counter-increment: top-rank;
  padding: 0.15rem 0;
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.4rem;
  align-items: baseline;
}
.top-stories li::before {
  content: counter(top-rank) '.';
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.top-stories a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.45;
}
.top-stories a:hover { text-decoration: underline; }
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  z-index: 10;
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { color: var(--heading); border-color: var(--text-muted); }
.classification {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
/* Print-only elements hidden on screen */
.print-cover, .print-toc, .print-bluf, .print-header, .print-footer { display: none; }
.print-url, .print-wep-prob, .print-footnotes, sub.ka-ref, .print-sources-label { display: none; }
