:root {
  color-scheme: light;
  --paper: #f4efe5;
  --paper-bright: #fffaf1;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.66);
  --ghost: rgba(17, 17, 17, 0.42);
  --hairline: rgba(17, 17, 17, 0.12);
  --coral: #ff6b4a;
  --yellow: #ffc95a;
  --mint: #b8e6c2;
  --lavender: #d8d5ff;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --page-width: 66rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 2%, rgba(255, 255, 255, 0.8), transparent 25rem),
    var(--paper);
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.ambient-orb {
  position: absolute;
  z-index: -2;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(38px);
  opacity: 0.5;
}

.ambient-orb-one {
  top: 8rem;
  left: -19rem;
  background: var(--lavender);
}

.ambient-orb-two {
  top: 24rem;
  right: -20rem;
  background: var(--yellow);
  opacity: 0.26;
}

.site-header,
.page-content,
.site-footer {
  position: relative;
  width: min(var(--page-width), calc(100% - 3rem));
  margin-inline: auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-kicker,
.brand-name,
.header-status,
.eyebrow,
.section-kicker,
.trace-label,
.trace-card-stats,
.latest-chip,
.history-count,
.site-footer {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-kicker {
  color: var(--ghost);
  font-size: 0.57rem;
  line-height: 1.25;
}

.brand-name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ghost);
  font-size: 0.59rem;
  white-space: nowrap;
}

.status-dot,
.chip-dot {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 0.22rem rgba(255, 201, 90, 0.18);
}

.page-shell[data-state="ready"] .status-dot {
  background: #56b76b;
  box-shadow: 0 0 0 0.22rem rgba(86, 183, 107, 0.16);
}

.page-shell[data-state="error"] .status-dot {
  background: var(--coral);
  box-shadow: 0 0 0 0.22rem rgba(255, 107, 74, 0.16);
}

.page-content {
  padding: 1rem 0 5rem;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(44rem, 70vh);
  place-items: center;
  padding: 2.8rem 0 3.5rem;
  text-align: center;
}

.hero::before {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(52rem, 92vw);
  height: 22rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  content: "";
  filter: blur(46px);
  transform: translate(-50%, -50%);
  z-index: -1;
}

.hero-copy {
  width: 100%;
}

.hero-mark-shell {
  position: relative;
  display: grid;
  width: clamp(7rem, 14vw, 10rem);
  height: clamp(7rem, 14vw, 10rem);
  margin: 0 auto 1.45rem;
  place-items: center;
  background: transparent;
}

.hero-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.hero-mark-spark {
  position: absolute;
  color: var(--ink);
  font-family: Georgia, serif;
  font-weight: 700;
}

.spark-one {
  top: -1.1rem;
  right: -1.6rem;
  font-size: 1.25rem;
  color: var(--coral);
}

.spark-two {
  bottom: -1rem;
  left: -1.3rem;
  font-size: 2rem;
  color: var(--yellow);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--ghost);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.4;
}

.eyebrow span {
  padding-inline: 0.28rem;
  color: var(--coral);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 52rem;
  margin: 1rem auto 0;
  font-size: clamp(4rem, 11vw, 8.3rem);
  font-weight: 600;
  letter-spacing: -0.085em;
  line-height: 0.91;
}

.hero-subtitle {
  max-width: 28rem;
  margin: 1.2rem auto 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  line-height: 1.55;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.7rem;
  padding: 0.76rem 1.1rem 0.78rem 1.2rem;
  border-radius: 999px;
  color: var(--paper-bright);
  background: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0.75rem 1.5rem rgba(17, 17, 17, 0.14);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-cta:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1rem 1.7rem rgba(17, 17, 17, 0.2);
  transform: translateY(-2px);
}

.hero-cta span {
  font-size: 1.05rem;
  line-height: 0.8;
}

.trace-panel {
  width: min(56rem, calc(100% - 3rem));
  margin: 0 auto;
  color: var(--ghost);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
}

.trace-grid {
  display: grid;
  grid-template-areas:
    "post reason"
    "stats stats";
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 0.6rem 2rem rgba(17, 17, 17, 0.025);
}

.trace-card {
  position: relative;
  min-width: 0;
  padding: 0.85rem 1rem 0.9rem;
  border-right: 1px solid var(--hairline);
  transition: background-color 180ms ease;
}

.trace-card:hover {
  background: rgba(255, 255, 255, 0.24);
}

.trace-card-post {
  grid-area: post;
  color: inherit;
  text-decoration: none;
}

.trace-card-reason {
  grid-area: reason;
  border-right: 0;
}

.trace-card-stats {
  display: flex;
  grid-area: stats;
  flex-wrap: wrap;
  gap: 0.6rem 1.15rem;
  border-top: 1px solid var(--hairline);
  border-right: 0;
  color: var(--ghost);
  font-size: 0.59rem;
}

.trace-card-stats strong {
  color: var(--muted);
  font-weight: 600;
}

.trace-label {
  display: block;
  color: var(--ghost);
  font-size: 0.59rem;
  font-weight: 500;
}

.trace-value {
  display: block;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
}

.trace-post-title {
  max-width: 95%;
  margin-top: 0.48rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-note {
  display: block;
  margin-top: 0.26rem;
  color: var(--ghost);
  font-size: 0.61rem;
}

.trace-arrow {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  color: var(--coral);
  font-family: var(--sans);
  font-size: 1rem;
}

.trace-reason {
  max-width: 22rem;
  margin: 0.5rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.trace-verdict {
  padding-top: 0.6rem;
  border-top: 1px solid var(--hairline);
}

.trace-verdict-line {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.trace-verdict-line .trace-note {
  margin-top: 0;
}

.latest-section,
.history-section {
  width: min(56rem, calc(100% - 3rem));
  margin: 8.25rem auto 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
}

.section-heading h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 1;
}

.text-link,
.read-link {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover,
.read-link:hover {
  color: var(--coral);
}

.latest-card {
  position: relative;
  margin-top: 1.3rem;
  padding: clamp(1.2rem, 4vw, 2.1rem);
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.05);
  border-radius: 1.25rem;
  background: var(--ink);
  color: var(--paper-bright);
  box-shadow: 0 1.6rem 3rem rgba(17, 17, 17, 0.11);
}

.latest-card::after {
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 19rem;
  height: 19rem;
  border: 1px solid rgba(255, 201, 90, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(255, 201, 90, 0.06), 0 0 0 4rem rgba(255, 201, 90, 0.035);
  content: "";
  pointer-events: none;
}

.latest-card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255, 250, 241, 0.58);
  font-family: var(--mono);
  font-size: 0.61rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.latest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 250, 241, 0.72);
  font-size: 0.59rem;
}

.latest-chip .chip-dot {
  background: var(--coral);
  box-shadow: none;
}

.latest-card h3 {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  margin: clamp(3rem, 7vw, 5rem) 0 0;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.98;
}

.latest-card p {
  position: relative;
  z-index: 1;
  max-width: 31rem;
  margin: 1rem 0 0;
  color: rgba(255, 250, 241, 0.64);
  font-size: 0.9rem;
  line-height: 1.55;
}

.read-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 2rem;
  color: var(--yellow);
}

.section-heading-history {
  align-items: center;
}

.history-count {
  color: var(--ghost);
  font-size: 0.59rem;
  white-space: nowrap;
}

.history-list {
  margin-top: 0.45rem;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(5.2rem, 0.24fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  transition: padding 180ms ease, color 180ms ease;
}

.history-item:hover {
  padding-inline: 0.4rem;
  color: var(--coral);
}

.history-date {
  color: var(--ghost);
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item:hover .history-title {
  color: var(--coral);
}

.history-age {
  color: var(--ghost);
  font-family: var(--mono);
  font-size: 0.61rem;
  white-space: nowrap;
}

.history-empty {
  padding: 1.2rem 0;
  color: var(--ghost);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0 2rem;
  color: var(--ghost);
  font-size: 0.56rem;
  line-height: 1.5;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--coral);
}

.footer-right {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .site-header,
  .page-content,
  .site-footer {
    width: min(100% - 2rem, var(--page-width));
  }

  .site-header {
    padding-top: 1.2rem;
  }

  .header-status {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 34rem;
    padding-top: 2.5rem;
  }

  h1 {
    font-size: clamp(3.75rem, 17vw, 6.5rem);
  }

  .trace-panel,
  .latest-section,
  .history-section {
    width: calc(100% - 1rem);
  }

  .trace-grid {
    grid-template-areas:
      "post"
      "reason"
      "stats";
    grid-template-columns: 1fr;
  }

  .trace-card {
    border-right: 0;
  }

  .trace-card-reason {
    border-top: 1px solid var(--hairline);
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .section-heading-history {
    align-items: start;
    flex-direction: row;
  }

  .text-link {
    font-size: 0.72rem;
  }

  .history-item {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.65rem;
  }

  .history-age {
    grid-column: 2;
    margin-top: -0.45rem;
    font-size: 0.56rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
