:root {
  --rq-ink: #ffffff;
  --rq-paper: #111827;
  --rq-accent: #2563eb;
  --rq-accent-hover: #1d4ed8;
  --rq-border: #e5e7eb;
  --rq-muted: #6b7280;
  --rq-surface: #f8f9fa;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--rq-ink);
  color: var(--rq-paper);
}

body {
  font-family: "DM Mono", monospace;
  font-weight: 400;
  line-height: 1.65;
}

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

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.rq-container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.rq-header {
  border-bottom: 1px solid var(--rq-border);
  position: sticky;
  top: 0;
  background: var(--rq-ink);
  z-index: 50;
}

.rq-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

.rq-logo {
  font-family: "DM Serif Display", serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--rq-accent);
  line-height: 1;
}

.rq-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  font-family: "DM Mono", monospace;
  font-weight: 400;
}

.rq-nav a {
  color: #9ca3af;
  font-family: "DM Mono", monospace;
  font-weight: 400;
}

.rq-nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.rq-nav li {
  margin: 0;
}

.rq-nav a:hover {
  color: var(--rq-paper);
}

.rq-mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
}

.rq-mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--rq-paper);
  margin: 4px auto;
}

.rq-btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--rq-border);
  font-size: 0.75rem;
  font-family: "DM Mono", monospace;
  font-weight: 400;
  transition: 0.2s ease;
}

.rq-btn-primary {
  background: var(--rq-accent);
  color: #fff !important;
  border-color: var(--rq-accent);
}

.rq-btn-primary:hover {
  background: var(--rq-accent-hover);
  border-color: var(--rq-accent-hover);
}

.rq-btn-secondary {
  background: #fff;
  color: var(--rq-paper) !important;
}

.rq-btn-secondary:hover {
  border-color: #9ca3af;
}

.rq-main {
  flex: 1;
}

.rq-hero {
  position: relative;
  border-bottom: 1px solid var(--rq-border);
  background: var(--rq-surface);
  overflow: hidden;
  isolation: isolate;
}

.rq-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 0 3.2rem;
  max-width: 760px;
}

.rq-receipt-spline {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rq-receipt-spline svg {
  width: 100%;
  height: 100%;
  max-width: 1100px;
}

.rq-rise {
  transform: translateY(640px);
  opacity: 0;
  will-change: transform, opacity;
}

@keyframes rq-receipt-rise {
  0%   { transform: translateY(640px); opacity: 0; }
  18%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { transform: translateY(-200px); opacity: 0; }
}

.rq-rise-1 { animation: rq-receipt-rise 14s linear 0s    infinite; }
.rq-rise-2 { animation: rq-receipt-rise 16s linear 3.5s  infinite; }
.rq-rise-3 { animation: rq-receipt-rise 13s linear 7s    infinite; }
.rq-rise-4 { animation: rq-receipt-rise 17s linear 10.5s infinite; }
.rq-rise-5 { animation: rq-receipt-rise 15s linear 1.5s  infinite; }

.rq-receipt-trace {
  stroke-dasharray: 90 410;
  animation: rq-receipt-trace 4.5s linear infinite,
             rq-receipt-trace-opacity 3.5s ease-in-out infinite;
}

@keyframes rq-receipt-trace {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -500; }
}

@keyframes rq-receipt-trace-opacity {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .rq-rise {
    transform: translateY(260px);
    opacity: 0.6;
    animation: none;
  }
  .rq-receipt-trace { animation: none; opacity: 0.7; }
}

.rq-eyebrow {
  text-transform: uppercase;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--rq-accent);
  margin: 0 0 1rem;
}

.rq-hero h1,
.rq-post h1,
.rq-error h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.rq-hero p {
  font-size: 0.88rem;
  color: var(--rq-muted);
  margin: 0;
}

.rq-section-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.8rem;
  margin: 0 0 1.25rem;
}

.rq-listing,
.rq-featured {
  padding: 2.5rem 0 0.25rem;
}

.rq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.rq-card {
  border: 1px solid var(--rq-border);
  background: #fff;
}

.rq-card-link {
  display: block;
  height: 100%;
}

.rq-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--rq-border);
}

.rq-card-body {
  padding: 1rem;
}

.rq-meta {
  color: var(--rq-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  margin: 0 0 0.7rem;
}

.rq-card h2 {
  font-family: "DM Serif Display", serif;
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.rq-excerpt {
  margin: 0 0 1rem;
  color: #4b5563;
  font-size: 0.78rem;
}

.rq-read-more {
  color: var(--rq-accent);
  font-size: 0.74rem;
}

.rq-post-main,
.rq-page-main {
  padding: 3rem 0 0;
}

.rq-post {
  width: min(760px, 92%);
  margin: 0 auto;
}

.rq-post-header {
  margin-bottom: 2rem;
}

.rq-post-header .rq-dek {
  color: var(--rq-muted);
  margin-top: 0;
}

.rq-post-image {
  width: 100%;
  height: auto;
  border: 1px solid var(--rq-border);
}

.gh-content {
  color: #1f2937;
  font-size: 0.94rem;
}

.gh-content > * + * {
  margin-top: 1.15rem;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
  font-family: "DM Serif Display", serif;
  margin: 2rem 0 0.75rem;
  line-height: 1.25;
}

.gh-content blockquote {
  border-left: 3px solid var(--rq-accent);
  margin: 1.2rem 0;
  padding: 0.5rem 1rem;
  background: var(--rq-surface);
}

.gh-content pre,
.gh-content code {
  font-family: "DM Mono", monospace;
}

.gh-content pre {
  background: var(--rq-surface);
  border: 1px solid var(--rq-border);
  padding: 0.8rem;
  overflow-x: auto;
}

.gh-content code {
  background: #f3f4f6;
  border: 1px solid var(--rq-border);
  padding: 0.1rem 0.3rem;
}

.gh-content a {
  color: var(--rq-accent);
}

.gh-content .kg-width-wide {
  width: min(1200px, 96vw);
  margin-left: calc(50% - min(1200px, 96vw) / 2);
}

.gh-content .kg-width-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.gh-content .kg-width-full img,
.gh-content .kg-width-wide img {
  width: 100%;
  display: block;
}

.gh-content .kg-card.kg-header-card h2.kg-header-card-header {
  font-family: "DM Serif Display", serif;
}

.gh-content [style*="font-family: var(--gh-font-heading)"] {
  font-family: "DM Serif Display", serif !important;
}

.gh-content [style*="font-family: var(--gh-font-body)"] {
  font-family: "DM Mono", monospace !important;
}

.rq-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rq-border);
  margin-top: 2rem;
}

.rq-post-nav a {
  color: var(--rq-accent);
  font-size: 0.76rem;
}

.rq-cta-banner {
  border-top: 1px solid var(--rq-border);
  margin-top: 2rem;
}

.rq-cta-banner-inner {
  text-align: center;
  padding: 3rem 0;
}

.rq-cta-banner h3 {
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  margin: 0 0 0.7rem;
}

.rq-cta-banner p {
  color: var(--rq-muted);
  max-width: 700px;
  margin: 0 auto 1.25rem;
}

.rq-membership-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 2rem 0 3rem;
}

.rq-membership-card {
  background: var(--rq-surface);
  border: 1px solid var(--rq-border);
  padding: 1.5rem;
}

.rq-membership-card h3 {
  font-family: "DM Serif Display", serif;
  margin: 0 0 0.5rem;
}

.rq-membership-card p {
  margin: 0 0 1rem;
  color: var(--rq-muted);
  font-size: 0.8rem;
}

.rq-error {
  text-align: center;
  padding: 6rem 0;
}

.rq-error p {
  color: var(--rq-muted);
  margin: 0 0 1rem;
}

.rq-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--rq-border);
  background: #111827;
  color: #9ca3af;
  font-family: "DM Mono", monospace;
}

.rq-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.rq-footer-brand p {
  max-width: 240px;
}

.rq-logo-footer {
  color: var(--rq-accent);
  display: inline-block;
  margin-bottom: 0.8rem;
}

.rq-footer h4 {
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  font-family: "DM Mono", monospace;
  font-weight: 400;
  color: #e5e7eb;
  margin: 0 0 1rem;
}

.rq-footer a {
  display: block;
  margin-bottom: 0.65rem;
  color: #9ca3af;
  font-size: 0.77rem;
  font-family: "DM Mono", monospace;
  font-weight: 400;
}

.rq-footer a:hover {
  color: #fff;
}

.rq-footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 1rem 0 1.25rem;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rq-footer-legal {
  display: flex;
  gap: 1.25rem;
}

.rq-footer-legal a {
  margin: 0;
  font-size: 0.75rem;
  color: #4b5563;
}

.rq-footer-legal a:hover {
  color: #fff;
}

@media (max-width: 1024px) {
  .rq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .rq-mobile-toggle {
    display: block;
  }

  .rq-nav {
    position: absolute;
    top: 57px;
    left: 0;
    right: 0;
    padding: 0.8rem 1rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--rq-border);
    flex-direction: column;
    align-items: flex-start;
    display: none;
  }

  .rq-nav ul {
    flex-direction: column;
    width: 100%;
  }

  .rq-nav.is-open {
    display: flex;
  }

  .rq-nav .rq-btn {
    width: 100%;
    text-align: center;
  }

  .rq-footer-grid,
  .rq-membership-grid {
    grid-template-columns: 1fr;
  }

  .rq-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  .rq-header-inner {
    padding: 1.25rem 0;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 640px) {
  .rq-grid {
    grid-template-columns: 1fr;
  }
}
