@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root { --font-grotesk: 'Space Grotesk'; --font-mono: 'IBM Plex Mono'; }

:root {
  --pearl: #f6f7fb;
  --pearl-deep: #eceef6;
  --surface: #ffffff;
  --ink: #1f2733;
  --ink-soft: #4a5563;
  --muted: #8b94a6;
  --line: #e3e6f0;
  --line-soft: #eef0f7;
  --violet: #8b7fd6;
  --teal: #58c4c0;
  --violet-deep: #6657b8;
  --teal-deep: #2f9b97;
  --accent-grad: linear-gradient(105deg, #8b7fd6 0%, #58c4c0 100%);
  --tint-violet: rgba(139, 127, 214, 0.12);
  --tint-teal: rgba(88, 196, 192, 0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 22px 50px rgba(31, 39, 51, 0.1);
  --shadow-soft: 0 12px 30px rgba(31, 39, 51, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% -6%, var(--tint-teal), transparent 26rem),
    radial-gradient(circle at 4% 2%, var(--tint-violet), transparent 24rem),
    var(--pearl);
  color: var(--ink);
  font-family: var(--font-grotesk), ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--ink);
  color: var(--pearl);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-mono), monospace;
  font-size: 0.82rem;
}

.skip-link:focus {
  top: 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-grotesk), system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.018em;
  color: var(--ink);
}

/* ---------- Ticker header (signature) ---------- */
.ticker-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(1.1) blur(6px);
}

.ticker-bar {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.brand-dot-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 3px rgba(139, 127, 214, 0.18);
  z-index: 2;
}

.brand-dot-ring {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  opacity: 0.7;
  animation: pulse-ring 2.2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.55);
    opacity: 0.75;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.brand-text strong {
  display: block;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  display: block;
  margin-top: 1px;
  font-family: var(--font-mono), monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.brand-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono), monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.status-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: blink 1.6s steps(1, end) infinite;
}

@keyframes blink {
  0%,
  60% {
    opacity: 1;
  }
  61%,
  100% {
    opacity: 0.25;
  }
}

.ticker-line {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(90deg, var(--tint-violet), transparent 60%);
}

.ticker-line {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding: 9px 0;
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  color: var(--ink-soft);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-key {
  flex: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet-deep);
  font-weight: 600;
}

.ticker-stamp {
  flex: none;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--pearl);
  font-weight: 500;
}

.ticker-feed {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  letter-spacing: 0.02em;
}

main {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Lead (compact, left-aligned) ---------- */
.lead {
  padding: 58px 0 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet-deep);
}

.eyebrow-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-grad);
}

.lead h1 {
  max-width: 760px;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.12;
}

.lead-lede {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.72;
}

/* Thin opal "signal light" strip: jpg layered over the brand gradient so it
   reads complete even before the image asset is added. */
.lead-strip {
  margin-top: 34px;
  height: clamp(90px, 13vw, 140px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 40%),
    url("/images/opalsignal-lead.jpg") center / cover no-repeat,
    var(--accent-grad);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.lead-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.16) 0,
    rgba(255, 255, 255, 0.16) 2px,
    transparent 2px,
    transparent 26px
  );
  mix-blend-mode: overlay;
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.section-meta {
  flex: none;
  font-family: var(--font-mono), monospace;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.feed,
.topics,
.about {
  padding: 44px 0;
}

/* ---------- Signal feed (timestamp-first cards, signature) ---------- */
.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: signal;
}

.feed-card {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  align-items: start;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.feed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(139, 127, 214, 0.5);
}

.feed-stamp {
  font-family: var(--font-mono), monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  padding-top: 3px;
  position: relative;
  padding-left: 16px;
}

.feed-stamp::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-grad);
}

.feed-body {
  min-width: 0;
}

.feed-tag {
  display: inline-block;
  font-family: var(--font-mono), monospace;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--tint-teal);
  padding: 3px 9px;
  border-radius: 6px;
}

.feed-what {
  display: block;
  margin: 11px 0 7px;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.feed-why {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.62;
}

.feed-go {
  align-self: center;
  flex: none;
  font-family: var(--font-mono), monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  transition: background 0.16s ease, color 0.16s ease;
}

.feed-card:hover .feed-go {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
}

/* ---------- Topic filters ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.topic-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
}

.topic-chip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-grad);
}

.topic-key {
  display: block;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.topic-chip p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.58;
}

/* ---------- About ---------- */
.about-lede {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.74;
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
  max-width: 720px;
}

.note-list li {
  position: relative;
  padding: 15px 18px 15px 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  line-height: 1.62;
}

.note-list li::before {
  content: "›";
  position: absolute;
  left: 18px;
  top: 13px;
  font-family: var(--font-mono), monospace;
  font-weight: 600;
  color: var(--violet-deep);
}

/* ---------- Footer ---------- */
.site-footer {
  width: min(1060px, calc(100% - 40px));
  margin: 32px auto 0;
  padding: 30px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-grad);
}

.footer-mark strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.footer-desc {
  margin: 10px 0 16px;
  max-width: 480px;
  line-height: 1.6;
  font-size: 0.92rem;
}

.footer-note {
  display: inline-block;
  margin: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--pearl-deep);
  color: var(--ink-soft);
  font-family: var(--font-mono), monospace;
  font-size: 0.76rem;
}

/* ---------- Article (single column, mono stamp at top) ---------- */
.article-shell {
  max-width: 740px;
  padding: 32px 0 80px;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 22px;
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--violet-deep);
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 4.5vw, 50px);
  box-shadow: var(--shadow-soft);
}

.stamp-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--pearl);
  font-family: var(--font-mono), monospace;
}

.stamp-key {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.stamp-value {
  font-size: 0.92rem;
  font-weight: 600;
}

.article-tag {
  display: inline-block;
  margin: 16px 0 0 10px;
  font-family: var(--font-mono), monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--tint-teal);
  padding: 4px 10px;
  border-radius: 6px;
  vertical-align: middle;
}

.article-head h1 {
  margin: 16px 0 0;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.16;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-meta .meta-mono {
  font-family: var(--font-mono), monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.article-lead {
  margin: 26px 0 4px;
  padding: 18px 0 18px 22px;
  border-left: 3px solid transparent;
  border-image: var(--accent-grad) 1;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.66;
  font-weight: 500;
}

.article-content {
  margin-top: 26px;
  color: #2a323e;
  font-size: 1.04rem;
  line-height: 1.82;
}

.article-content h2 {
  margin: 40px 0 12px;
  font-size: clamp(1.3rem, 2.3vw, 1.6rem);
  padding-left: 16px;
  position: relative;
}

.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 4px;
  border-radius: 4px;
  background: var(--accent-grad);
}

.article-content h3 {
  margin: 28px 0 10px;
  font-size: 1.18rem;
}

.article-content p {
  margin: 0 0 18px;
}

.article-content a {
  color: var(--violet-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.article-content a:hover {
  color: var(--teal-deep);
}

.article-content ul,
.article-content ol {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.article-content ul li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent-grad);
  transform: rotate(45deg);
}

.article-content ol {
  counter-reset: ol-count;
}

.article-content ol li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
  line-height: 1.6;
  counter-increment: ol-count;
}

.article-content ol li::before {
  content: counter(ol-count);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--font-mono), monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet-deep);
}

.article-content blockquote {
  margin: 26px 0;
  padding: 20px 24px;
  background: linear-gradient(105deg, var(--tint-violet), var(--tint-teal));
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 127, 214, 0.3);
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.62;
  font-weight: 500;
}

.article-content blockquote p {
  margin: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.94rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.article-content th,
.article-content td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.article-content th:last-child,
.article-content td:last-child {
  border-right: 0;
}

.article-content tbody tr:last-child td {
  border-bottom: 0;
}

.article-content thead th {
  background: var(--ink);
  color: var(--pearl);
  font-family: var(--font-mono), monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}

.article-content tbody tr:nth-child(even) td {
  background: var(--pearl);
}

/* ---------- FAQ + sources ---------- */
.faq-section,
.source-note {
  margin-top: 38px;
}

.faq-section h2,
.source-note h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  margin-bottom: 8px;
}

.faq-section details {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::before {
  content: "+";
  font-family: var(--font-mono), monospace;
  color: var(--violet-deep);
  font-weight: 600;
}

.faq-section details[open] summary::before {
  content: "–";
}

.faq-section details p {
  margin: 10px 0 0 1.5em;
  color: var(--ink-soft);
  line-height: 1.7;
}

.source-note {
  padding: 20px 22px;
  background: var(--pearl);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.source-note p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.article-foot {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono), monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--violet-deep);
}

.back-link::before {
  content: "←";
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .feed-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feed-go {
    justify-self: start;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .ticker-feed {
    display: none;
  }

  .lead {
    padding: 40px 0 12px;
  }

  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
