:root {
  --paper: #f0ead6;
  --paper-dim: #d9cfad;
  --charcoal: #1a1a1a;
  --ink: #0c0c0c;
  --crimson: #dc143c;
  --gold: #c5a945;
  --ash: #746f62;
  --line: rgba(26, 26, 26, 0.28);
  --shadow: 10px 10px 0 rgba(26, 26, 26, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 24%, rgba(220, 20, 60, 0.08), transparent 18rem),
    radial-gradient(circle at 80% 12%, rgba(197, 169, 69, 0.1), transparent 14rem),
    linear-gradient(90deg, rgba(26, 26, 26, 0.022) 1px, transparent 1px),
    linear-gradient(rgba(26, 26, 26, 0.022) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
  color: var(--charcoal);
  font-family: "Courier New", Courier, monospace;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
}

body::before {
  opacity: 0.13;
  background:
    repeating-radial-gradient(circle at 20% 30%, rgba(26, 26, 26, 0.16) 0 1px, transparent 1px 7px),
    linear-gradient(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.04));
  mix-blend-mode: multiply;
}

body::after {
  display: none;
}

a {
  color: inherit;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.top-strip,
.bottom-strip {
  display: flex;
  width: 100%;
  margin-left: 0;
  overflow: hidden;
  border-block: 3px solid var(--ink);
  background: var(--crimson);
  color: var(--paper);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.bottom-strip {
  margin-top: 72px;
  transform: rotate(1deg);
}

.ticker {
  display: flex;
  min-width: max-content;
  animation: ticker 26s steps(18, end) infinite;
}

.ticker span {
  padding: 10px 18px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 18px;
  text-transform: uppercase;
}

.brand {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 0.9;
  letter-spacing: 0;
  text-decoration: none;
  text-shadow: 3px 3px 0 var(--crimson), -2px -2px 0 rgba(197, 169, 69, 0.75);
  animation: jitter 1.8s steps(2, end) infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
}

.stamp {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none;
  transform: rotate(-1deg);
}

.stamp.active {
  background: var(--charcoal);
  color: var(--paper);
}

.stamp.red {
  background: var(--crimson);
  color: var(--paper);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(1deg);
}

.language-switcher span {
  color: rgba(26, 26, 26, 0.55);
}

.language-select {
  min-width: 76px;
  border: 0;
  background: transparent;
  color: var(--charcoal);
  font: inherit;
  text-transform: uppercase;
}

.language-select:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: end;
  padding: 30px 0 28px;
}

.eyebrow,
.mono-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 3px solid var(--ink);
  background: var(--crimson);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.hero h1,
.detail-hero h1 {
  max-width: 980px;
  margin: 14px 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(50px, 7.4vw, 98px);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
  filter: contrast(1.3);
}

.hero h1 span,
.detail-hero h1 span {
  display: inline-block;
  padding: 0 10px;
  background: var(--charcoal);
  color: var(--paper);
  transform: rotate(-1deg);
  text-shadow: 4px 0 0 var(--crimson);
  animation: flicker 2.8s steps(4, end) infinite;
}

.lede {
  max-width: 760px;
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
  font-weight: 800;
}

.script-mark {
  display: block;
  margin: -10px 0 10px;
  color: var(--crimson);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(38px, 7vw, 88px);
  line-height: 0.85;
  transform: rotate(-5deg);
  text-shadow: 2px 2px 0 var(--ink);
}

.hero-note {
  border: 3px solid var(--ink);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(220, 20, 60, 0.12), transparent 45%),
    var(--paper-dim);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.hero-note strong {
  display: block;
  margin: 14px 0 10px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 36px;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 16px;
  border: 3px solid var(--ink);
  background: var(--crimson);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.button.secondary {
  background: var(--paper);
  color: var(--ink);
}

.section {
  padding: 46px 0 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  border-bottom: 4px solid var(--ink);
}

.section-head h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(38px, 6vw, 82px);
  line-height: 0.9;
  text-transform: uppercase;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.category-browse {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 24px;
}

.category-browse a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 2px solid rgba(26, 26, 26, 0.65);
  background: rgba(217, 207, 173, 0.76);
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.category-browse span {
  color: rgba(26, 26, 26, 0.52);
  font-size: 10px;
}

.workflow-groups {
  display: grid;
  gap: 34px;
}

.category-section {
  scroll-margin-top: 20px;
}

.category-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  border-bottom: 2px solid rgba(26, 26, 26, 0.32);
  padding-bottom: 8px;
}

.category-section-head h3 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.95;
  text-transform: uppercase;
}

.category-section-head p {
  max-width: 680px;
  margin: 6px 0 0;
  color: rgba(26, 26, 26, 0.64);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.category-section-head > span {
  flex: 0 0 auto;
  color: rgba(26, 26, 26, 0.48);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-card {
  position: relative;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 7px 7px 0 rgba(26, 26, 26, 0.92);
  text-decoration: none;
  transform: rotate(var(--tilt, -1deg));
  transition: transform 0.1s steps(2, end), box-shadow 0.1s steps(2, end);
}

.workflow-card:nth-child(2) {
  --tilt: 1deg;
}

.workflow-card:nth-child(3) {
  --tilt: -0.5deg;
}

.workflow-card:hover {
  transform: rotate(0deg) translate(-3px, -3px);
  box-shadow: 10px 10px 0 var(--ink);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.category {
  width: fit-content;
  flex: 0 0 auto;
  padding: 4px 8px;
  background: var(--charcoal);
  color: var(--paper);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.card-author {
  min-width: 0;
  overflow: hidden;
  color: rgba(26, 26, 26, 0.5);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.workflow-card h3 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(20px, 1.55vw, 24px);
  line-height: 1.1;
  display: -webkit-box;
  min-height: 80px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  text-wrap: balance;
}

.audience-tag {
  padding: 9px 10px;
  border: 2px solid var(--ink);
  background: var(--crimson);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.result {
  margin-top: auto;
  display: -webkit-box;
  min-height: 60px;
  overflow: hidden;
  padding: 9px 10px;
  border-left: 6px solid var(--crimson);
  background: rgba(220, 20, 60, 0.12);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-stats span {
  display: inline-flex;
  min-width: 0;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid rgba(26, 26, 26, 0.38);
  background: rgba(197, 169, 69, 0.14);
  color: rgba(26, 26, 26, 0.62);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.post-stats strong {
  color: var(--charcoal);
  font-size: 10px;
  line-height: 1;
}

.meta-row,
.tag-list,
.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 2px solid var(--ink);
  background: var(--paper-dim);
  font-size: 11px;
  font-weight: 900;
}

.workflow-card .tag-list {
  max-height: 25px;
  overflow: hidden;
}

.workflow-card .mono-label {
  margin-top: auto;
}

.pill.red {
  background: var(--crimson);
  color: var(--paper);
}

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

.category-tile {
  min-height: 150px;
  padding: 16px;
  border: 3px solid var(--ink);
  background: var(--charcoal);
  color: var(--paper);
  box-shadow: 7px 7px 0 var(--crimson);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 34px;
  text-transform: uppercase;
}

.detail-hero {
  padding: 32px 0 22px;
}

.detail-hero.compact {
  padding-top: 22px;
}

.detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 18px;
  align-items: end;
}

.detail-hero.compact h1 {
  max-width: 940px;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.08;
  text-transform: none;
  text-wrap: pretty;
}

.detail-scorecard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 3px solid var(--ink);
  background: var(--paper-dim);
  padding: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(1deg);
}

.detail-scorecard span {
  border-bottom: 2px solid rgba(26, 26, 26, 0.22);
  padding-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-scorecard span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.breadcrumb {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 250px;
  gap: 28px;
  align-items: start;
  justify-content: center;
}

.panel {
  margin-bottom: 22px;
  padding: 18px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
}

.panel h2 {
  margin: 0 0 14px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 26px;
  text-transform: uppercase;
}

.detail-brief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.detail-brief article {
  border: 3px solid var(--ink);
  background: var(--charcoal);
  color: var(--paper);
  padding: 14px;
  box-shadow: 5px 5px 0 var(--crimson);
}

.detail-brief span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-brief p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.article-content {
  display: grid;
  gap: 16px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.72;
  color: rgba(26, 26, 26, 0.86);
}

.article-content p {
  margin: 0;
}

.article-content a {
  color: var(--charcoal);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.article-content strong {
  color: var(--charcoal);
  font-weight: 900;
}

.article-content code {
  background: rgba(26, 26, 26, 0.1);
  padding: 1px 5px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 12px 0 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  line-height: 1.12;
  text-transform: none;
  text-wrap: pretty;
  color: var(--charcoal);
}

.article-content h1,
.article-content h2 {
  font-size: clamp(21px, 1.9vw, 26px);
}

.article-content h3 {
  font-size: clamp(18px, 1.6vw, 22px);
}

.article-content h4 {
  font-size: 18px;
}

.article-content ul,
.article-content ol {
  margin: 0;
  padding-left: 24px;
  display: grid;
  gap: 10px;
}

.article-content li {
  padding-left: 6px;
}

.article-content blockquote {
  margin: 0;
  border-left: 6px solid var(--crimson);
  background: rgba(220, 20, 60, 0.09);
  padding: 10px 16px;
  font-weight: 800;
}

.article-image {
  width: min(100%, 720px);
  max-width: calc(100% - 10px);
  margin: 4px auto;
}

.article-image img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: contain;
  border: 3px solid var(--ink);
  background: rgba(217, 207, 173, 0.42);
  box-shadow: 3px 3px 0 var(--ink);
}

.article-image figcaption {
  margin-top: 8px;
  color: rgba(26, 26, 26, 0.56);
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-content pre {
  margin: 0;
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--charcoal);
  color: var(--paper);
  padding: 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.content-panel {
  scroll-margin-top: 24px;
}

.detail-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-related-grid .workflow-card {
  min-height: 238px;
}

.sidebar {
  position: sticky;
  top: 22px;
}

.sidebar .panel {
  margin-bottom: 16px;
  padding: 14px;
  box-shadow: 4px 4px 0 var(--ink);
}

.sidebar .panel h2 {
  font-size: 22px;
}

.signal-group + .signal-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px solid rgba(26, 26, 26, 0.18);
}

.signal-group > span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.55);
}

.source-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.footer {
  padding: 36px 0 46px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes jitter {
  0%,
  100% {
    transform: translate(0, 0) rotate(-0.4deg);
  }
  50% {
    transform: translate(1px, -1px) rotate(0.4deg);
  }
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  40% {
    opacity: 0.82;
  }
  42% {
    opacity: 1;
  }
  70% {
    transform: translateX(1px) rotate(-1deg);
  }
}

@keyframes scan-jump {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .hero,
  .detail-title-row,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .workflow-grid,
  .categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-section-head {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .sidebar {
    position: static;
  }

  .detail-brief {
    grid-template-columns: 1fr;
  }

  .detail-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero h1,
  .detail-hero h1 {
    font-size: clamp(44px, 15vw, 78px);
  }

  .detail-hero.compact h1 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.1;
  }

  .detail-scorecard {
    transform: none;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .workflow-grid,
  .categories {
    grid-template-columns: 1fr;
  }

  .workflow-card {
    min-height: auto;
  }

  .workflow-card h3 {
    min-height: auto;
    font-size: clamp(28px, 9vw, 42px);
  }
}
