:root {
  --bg: #0c0a0d;
  --bg-elevated: #161218;
  --ink: #f4efe8;
  --ink-muted: #a89f96;
  --accent: #f7931e;
  --accent-hot: #ffb347;
  --accent-dim: rgba(247, 147, 30, 0.14);
  --line: rgba(244, 239, 232, 0.1);
  --danger: #e85d4c;
  --ok: #3ecf8e;
  --warn: #f0c14b;
  --font-display: "Syne", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 68rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(247, 147, 30, 0.16), transparent 55%),
    radial-gradient(900px 500px at -10% 30%, rgba(120, 70, 30, 0.18), transparent 50%),
    linear-gradient(180deg, #120e12 0%, var(--bg) 40%, #0a080b 100%);
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-hot);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(12, 10, 13, 0.72);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.brand img {
  width: 2.1rem;
  height: 2.1rem;
  filter: drop-shadow(0 0 12px rgba(247, 147, 30, 0.35));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
}

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

.hero {
  position: relative;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-stage {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(12, 10, 13, 0.55) 0%, rgba(12, 10, 13, 0.82) 48%, rgba(12, 10, 13, 0.95) 100%),
    url("../trend2truth-logo.png") right 8% center / min(52vw, 34rem) no-repeat;
  opacity: 0.55;
  pointer-events: none;
  animation: drift 18s var(--ease) infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-1.5%, 1%, 0) scale(1.04);
  }
}

.hero-copy {
  position: relative;
  max-width: 36rem;
  animation: rise 0.9s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  color: var(--accent);
  margin-bottom: 0.35em;
  text-wrap: balance;
}

.hero .lede {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--ink);
  max-width: 30rem;
}

.hero .support {
  color: var(--ink-muted);
  max-width: 28rem;
  margin-bottom: 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 1s 0.15s var(--ease) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border-radius: 0.35rem;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #120d08;
}

.btn-primary:hover {
  background: var(--accent-hot);
  color: #120d08;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 28rem;
  font-size: 0.98rem;
}

.exp-list {
  display: grid;
  gap: 0;
}

.exp-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.exp-row:hover {
  background: linear-gradient(90deg, var(--accent-dim), transparent 60%);
}

.exp-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding-top: 0.35rem;
}

.exp-row h3 {
  font-size: 1.25rem;
  margin: 0 0 0.35em;
}

.exp-row p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-running {
  background: rgba(62, 207, 142, 0.15);
  color: var(--ok);
}

.badge-live {
  background: var(--accent-dim);
  color: var(--accent-hot);
}

.badge-queued {
  background: rgba(240, 193, 75, 0.12);
  color: var(--warn);
}

.badge-verdict {
  background: rgba(232, 93, 76, 0.14);
  color: var(--danger);
}

.journal-list {
  display: grid;
  gap: 1.25rem;
}

.journal-item {
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.journal-item time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.journal-item h3 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.2rem;
}

.journal-item h3 a {
  color: var(--ink);
  text-decoration: none;
}

.journal-item h3 a:hover {
  color: var(--accent);
}

.rules {
  display: grid;
  gap: 1rem;
  counter-reset: rule;
}

.rule {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.85rem;
  align-items: start;
}

.rule::before {
  counter-increment: rule;
  content: counter(rule, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 0.2rem;
}

.rule h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25em;
}

.rule p {
  color: var(--ink-muted);
  margin: 0;
}

.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.disclaimer {
  font-size: 0.85rem;
  opacity: 0.85;
}

.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  max-width: 20ch;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  color: var(--ink-muted);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.25rem 0 1.75rem;
}

.ledger th,
.ledger td {
  text-align: left;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.ledger th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
}

.scorer {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
  margin: 1.5rem 0 2rem;
}

.scorer label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
}

.scorer textarea,
.scorer input,
.scorer select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--bg-elevated);
  color: var(--ink);
  font: inherit;
}

.scorer textarea {
  min-height: 7rem;
  resize: vertical;
}

.score-panel {
  display: none;
  margin-top: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: rgba(22, 18, 24, 0.9);
  animation: rise 0.45s var(--ease) both;
}

.score-panel.is-open {
  display: block;
}

.score-big {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.score-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.4rem 0 1rem;
}

.score-bars {
  display: grid;
  gap: 0.65rem;
}

.score-bar {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2.2rem;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.85rem;
}

.score-bar span:first-child {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bar-track {
  height: 0.45rem;
  background: rgba(244, 239, 232, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  border-radius: inherit;
  transition: width 0.7s var(--ease);
}

.download-box {
  margin: 1.5rem 0;
  padding: 1.25rem 1.35rem;
  border: 1px dashed rgba(247, 147, 30, 0.45);
  background: rgba(247, 147, 30, 0.06);
}

.queued-grid {
  display: grid;
  gap: 1rem;
}

.queued-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.queued-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3em;
}

.queued-item p {
  color: var(--ink-muted);
  margin: 0;
}

@media (max-width: 720px) {
  .exp-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .hero-stage {
    background-position: right -20% center;
    opacity: 0.28;
  }

  .score-bar {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
