/* =====================================================================
   Editorial article template.

   Deliberately NOT the mono, uppercase, letterspaced treatment used on the
   product pages. That look reads as terminal output, which is right for a
   scan report and wrong for something someone is meant to read for four
   minutes. Titles here are large sans with tight tracking; body copy gets a
   real measure and generous leading.

   Loaded on top of styles.css, so it inherits the colour tokens and only
   overrides typography and layout inside .art.
   ===================================================================== */

.art-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
@media (max-width: 900px) {
  .art-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---- masthead ---- */

.art-kicker {
  display: block;
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1rem;
}

.art h1 {
  font-family: var(--f-body);
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.1rem;
  text-wrap: balance;
}

.art-standfirst {
  font-family: var(--f-body);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  color: var(--mid);
  max-width: 40ch;
  margin-bottom: 1.75rem;
}

.art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.76rem;
  color: var(--dim);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

/* ---- body ---- */

.art p {
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.72;
  color: #B9B7AE;
  max-width: 62ch;
  margin-bottom: 1.15rem;
}
.art p strong { color: var(--ink); font-weight: 600; }
.art p em { color: var(--ink); font-style: italic; }

.art h2 {
  font-family: var(--f-body);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
  margin: 2.75rem 0 0.9rem;
  text-wrap: balance;
}
.art h3 {
  font-family: var(--f-body);
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 1.9rem 0 0.5rem;
}

.art code {
  font-family: var(--f-mono);
  font-size: 0.88em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 3px;
  padding: 0.08em 0.32em;
}

.art ul, .art ol { max-width: 62ch; margin: 0 0 1.3rem; padding-left: 1.1rem; }
.art li {
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  color: #B9B7AE;
  margin-bottom: 0.5rem;
}
.art li::marker { color: var(--dim); }

.art a { color: var(--ink); text-decoration: underline; text-decoration-color: #4A463D; text-underline-offset: 3px; }
.art a:hover { text-decoration-color: var(--mid); }

/* ---- the numbered mistake blocks ---- */

.mistake {
  position: relative;
  margin: 3rem 0 0;
  padding: 1.75rem 0 0 0;
  border-top: 1px solid var(--line);
}
.mistake-n {
  display: block;
  font-family: var(--f-body);
  font-size: clamp(3rem, 8vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px #34322C;
  margin-bottom: 0.4rem;
  user-select: none;
}
.mistake h2 { margin-top: 0; }

.mistake-cost {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  border: 1px solid #2E2C26;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  margin-bottom: 1rem;
}

/* ---- pull quote ---- */

.art-pull {
  font-family: var(--f-body);
  font-size: clamp(1.1rem, 2.1vw, 1.4rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 30ch;
  margin: 2.25rem 0;
  padding-left: 1.15rem;
  border-left: 2px solid #34322C;
  text-wrap: balance;
}

/* ---- inline illustration ---- */

.art-fig {
  margin: 2rem 0 2.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0A0A09;
  padding: 1.5rem;
  overflow: hidden;
}
.art-fig svg { display: block; width: 100%; height: auto; }
.art-fig figcaption {
  font-family: var(--f-body);
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: 0.9rem;
  line-height: 1.5;
}

/* The scan line that sweeps the mock bundle. */
@keyframes sweep { 0% { transform: translateX(-8%); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(108%); opacity: 0; } }
.fig-sweep { animation: sweep 4.5s cubic-bezier(.4,0,.2,1) infinite; }

@keyframes blink { 0%,45% { opacity: 1; } 55%,100% { opacity: 0.25; } }
.fig-flag { animation: blink 1.6s steps(1,end) infinite; }

/* ---- sidebar cards ---- */

.rail { display: grid; gap: 1rem; position: sticky; top: 1.5rem; }
@media (max-width: 900px) { .rail { position: static; } }

.card {
  position: relative;
  border: 1px solid #26241F;
  border-radius: 10px;
  background: #0C0C0B;
  padding: 1.25rem;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: #43403A; transform: translateY(-2px); }


.card-eyebrow {
  display: block;
  font-family: var(--f-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.55rem;
}
.card h3 {
  font-family: var(--f-body);
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.28;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.card p {
  font-family: var(--f-body);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--mid);
  margin-bottom: 0.95rem;
}
.card .btn {
  display: block;
  text-align: center;
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--btn);
  color: var(--btn-ink);
  border-radius: 5px;
  padding: 0.68rem 1rem;
  text-decoration: none;
  transition: background .16s ease;
}
.card .btn:hover { background: #F5F0E4; }

.card-list { display: grid; gap: 0.55rem; }
.card-list a {
  font-family: var(--f-body);
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--mid);
  text-decoration: none;
  display: flex;
  gap: 0.5rem;
  transition: color .15s ease;
}
.card-list a::before { content: "\2192"; color: var(--dim); flex: 0 0 auto; }
.card-list a:hover { color: var(--ink); }
.card-list a:hover::before { color: var(--dim); }

.check-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-family: var(--f-body);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--mid);
  margin-bottom: 0.5rem;
}
.check-row svg { flex: 0 0 auto; width: 0.92rem; height: 0.92rem; margin-top: 0.15rem; color: var(--mid); }

/* ---- scroll reveal ---- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .fig-sweep, .fig-flag { animation: none; }
}

/* =====================================================================
   PUNCH LAYOUT — hero number, oversized headline, arrow lines.
   For articles that lead with a figure rather than an argument.
   ===================================================================== */

.hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #050505;
  margin-bottom: 2rem;
  border: 1px solid #221F1A;
}
.hero svg { display: block; width: 100%; height: auto; }

.art.punchy h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin-bottom: 1.25rem;
}
.art.punchy .art-standfirst {
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  color: #B9B7AE;
  max-width: 46ch;
}

/* Arrow lines: short, bold, one idea each. */
.punch { list-style: none; margin: 1.5rem 0 2rem; padding: 0; max-width: 54ch; }
.punch li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  font-family: var(--f-body);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.punch li::before {
  content: "\2192";
  color: var(--dim);
  font-weight: 400;
  flex: 0 0 auto;
}

/* Big figure pulled out of the paragraph flow. */
.figure-block {
  display: grid;
  gap: 0.35rem;
  margin: 2rem 0;
  padding: 1.4rem 1.5rem;
  border-radius: 10px;
  border: 1px solid #2A2822;
  background: #0C0C0B;
}
.figure-block b {
  font-family: var(--f-body);
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.figure-block span {
  font-family: var(--f-body);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--mid);
}

/* Cost band on each mistake, replacing the muted severity pill. */
.cost-tag {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--mid);
  margin-bottom: 0.7rem;
}
.mistake-n { -webkit-text-stroke: 1px #3E3A32; }

@keyframes pulse-glow { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.hero-glow { animation: pulse-glow 3.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .hero-glow { animation: none; } }

/* End-of-article CTA. The guide engine emits .legal-draft for this; restyled
   here so it matches the rail cards instead of the old terminal treatment. */
.art .legal-draft {
  position: relative;
  border: 1px solid #26241F;
  border-radius: 10px;
  background: #0C0C0B;
  padding: 1.5rem;
  overflow: hidden;
  max-width: 62ch;
}
.art .legal-draft p { font-size: 0.95rem; color: var(--mid); max-width: none; }
.art .legal-draft strong { color: var(--ink); }
.art .legal-draft .cta { margin-top: 0.35rem; }
