/* Creative Value Monitor — research article (composition and value).
   Page-only styles, loaded after updates.css on
   /research/composition-and-value/ alone. Charts: headline dot grid,
   value and payments ledger, method steps,
   composition strip and share-of-training rows. */

:root { --gutter: 32px; }

.page-head h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1;
  max-width: 880px;
}

/* Article runs the full shell width; prose keeps the reading measure */
.article { margin-top: 36px; max-width: none; }
.article > * { max-width: none; }
.measure { max-width: var(--measure) !important; }

.article p { letter-spacing: normal; }
.article p.intro { margin-bottom: 8px; }

.article h2 { margin: 72px 0 20px; max-width: var(--measure); }

.mono { font-family: "IBM Plex Mono", monospace; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:target { scroll-margin-top: 24px; }

/* Section markers */
.sec {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 80px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate);
}
.sec i { display: grid; grid-template-columns: repeat(3, 5px); gap: 3px; }
.sec i b { width: 5px; height: 5px; border-radius: 50%; background: var(--navy); }
.sec i b:nth-child(2) { background: var(--bluegrey); }
.sec i b:nth-child(3) { background: var(--slate); }
.sec::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.article .sec + h2 { margin-top: 18px; }

/* Figure frame */
.fig {
  position: relative;
  margin: 30px 0 36px;
  padding: 28px 30px 22px;
  background: rgba(243,240,216,.6);
  border: 1px solid var(--line);
}
.article .fig p { margin: 0; }
.article .fig .fig-k { font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin: 0 0 6px; }
.article .fig .fig-t { font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: -.015em; color: var(--navy); margin: 0 0 18px; }
.article .fig .fig-k + .legend { margin-top: 18px; }
.cap {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--slate);
}
.cap-flush { margin-top: 0; border-top: 0; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(8,37,70,.72);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; flex: none; }
.sw { width: 16px; height: 10px; border-radius: 0 3px 3px 0; }
.sw-worth { background: rgba(125,153,165,.45); }
.sw-paid { background: var(--navy); }
.sw-dagger { font-family: "Inter Tight", Inter, sans-serif; font-size: 14px; font-weight: 700; color: var(--navy); }
.sw-dot { width: 12px; height: 12px; border-radius: 50%; }
.sw-range {
  width: 24px;
  height: 10px;
  border-left: 2px solid var(--navy);
  border-right: 2px solid var(--navy);
  background: linear-gradient(var(--navy), var(--navy)) center / 100% 2px no-repeat;
  opacity: .6;
}

/* Headline: paid and unpaid, dot grid */
.fig-hero {
  margin-top: 36px;
  padding: 44px 44px 40px;
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 56px; align-items: stretch; }
.hero-l { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.article .hero-line {
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.22;
  letter-spacing: -.02em;
  color: var(--cream-2);
  margin: -4px 0 0;
  max-width: 460px;
}
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-n {
  display: block;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -.04em;
  line-height: .95;
}
.hero-k {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: #C9D6DC;
}
.hero-k i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dots { display: grid; grid-template-columns: repeat(10, 26px); gap: 8px; justify-content: end; }
.dot { width: 26px; height: 26px; border-radius: 50%; background: rgba(125,153,165,.45); }
.dot.paid { background: var(--cream-2); }
.dot.part { background: linear-gradient(90deg, #F3F0D8 0 40%, rgba(125,153,165,.45) 40% 100%); }
.article .dots-note {
  margin: 16px 0 -2px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  line-height: 1.4;
  color: #C9D6DC;
}

/* Worth and paid ledger */
.lg-head, .lg-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 76px 128px 64px;
  column-gap: 20px;
  align-items: center;
}
.lg-head {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line-strong);
}
.lg-head span:nth-child(n+3) { text-align: right; }
.lg-row { padding: 16px 0 14px; border-bottom: 1px solid var(--line); row-gap: 8px; }
.lg-name {
  margin: 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.lg-bar { position: relative; height: 20px; outline-offset: 3px; }
.lg-worth, .lg-paid { position: absolute; left: 0; top: 2px; height: 16px; transform-origin: left center; }
.lg-worth { background: rgba(125,153,165,.45); border-radius: 0 4px 4px 0; }
.lg-paid { min-width: 3px; background: var(--navy); border-radius: 0 3px 3px 0; box-shadow: 2px 0 0 #F3F0D8; }
.lg-num {
  text-align: right;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.lg-sh { color: var(--slate); font-weight: 500; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: rgba(8,37,70,.72);
  white-space: nowrap;
}
.oneoff {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--slate);
  margin-top: 3px;
  white-space: nowrap;
}
.chip-ink { color: var(--navy); }
.oneoff-lead { margin-top: 0; font-size: 13px; color: var(--navy); }
.chip svg, .oneoff svg { flex: none; }
.lg-deals { grid-column: 1 / 3; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 620px; }
.article .lg-deals a { color: var(--slate); border-bottom-color: var(--line); }

/* Method steps */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; flex-direction: column; }
/* Minimum heights exclude padding, as in the canvas */
.st-in, .st-main, .st-out { box-sizing: content-box; }
.st-in { background: var(--cream-2); border: 1px solid rgba(8,37,70,.2); padding: 12px 14px; font-size: 13px; line-height: 1.55; min-height: 112px; }
.st-k { display: block; margin-bottom: 4px; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(8,37,70,.8); }
.st-arrow { position: relative; width: 1.5px; height: 22px; margin: 0 auto; background: var(--slate); }
.st-arrow::after { content: ""; position: absolute; bottom: -1px; left: -4px; border: 4.75px solid transparent; border-top: 6px solid var(--slate); border-bottom: 0; }
.st-main { background: var(--navy); color: var(--cream); padding: 14px 16px 18px; min-height: 104px; }
.st-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
}
.article .st-main p { margin: 12px 0 0; font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; font-size: 16px; line-height: 1.2; color: var(--cream); }
.st-out { background: rgba(125,153,165,.32); border: 1px solid var(--bluegrey); padding: 12px 16px 14px; min-height: 96px; }
.article .st-out p { margin: 0; font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--navy); }
.st-out.dark { background: var(--navy); border-color: var(--bluegrey); }
.article .st-out.dark p { color: var(--cream); }
.st-out.dark .st-k { color: #C9D6DC; }

/* Composition strip */
.brk { display: flex; gap: 2px; margin: 0 0 8px; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .04em; color: var(--navy); }
.brk span { position: relative; padding-top: 6px; border-top: 1.5px solid currentColor; }
.brk span::before, .brk span::after { content: ""; position: absolute; top: -1px; width: 1.5px; height: 7px; background: currentColor; }
.brk span::before { left: 0; }
.brk span::after { right: 0; }
.brk .brk-rest { border-color: transparent; }
.brk .brk-rest::before, .brk .brk-rest::after { display: none; }
.strip { display: flex; gap: 2px; height: 44px; margin-bottom: 30px; }
.strip > span {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--cream-2);
  white-space: nowrap;
  background: var(--navy);
  transform-origin: left center;
}
.strip > span:first-child { border-radius: 4px 0 0 4px; }
.strip > span:last-child { border-radius: 0 4px 4px 0; }
.strip .is-other { background: var(--bluegrey); color: var(--navy); }
.strip .strip-lbl.is-clipped { visibility: hidden; }

/* Share-of-training rows */
.dw-row, .dw-axis { display: grid; grid-template-columns: 236px minmax(0, 1fr) 104px; column-gap: 20px; align-items: center; }
.dw-row { padding: 6px 0; color: var(--navy); outline-offset: 2px; }
.dw-row.is-other { color: var(--muted); }
.dw-label { text-align: right; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.dw-row.is-other .dw-label { font-weight: 500; }
.dw-track {
  position: relative;
  height: 26px;
  color: var(--navy);
  background-image: linear-gradient(to right, rgba(8,37,70,.12) 1px, transparent 1px);
  background-size: 25% 100%;
  border-right: 1px solid rgba(8,37,70,.12);
}
.dw-row.is-other .dw-track { color: var(--bluegrey); }
.dw-bar { position: absolute; left: 0; top: 7px; height: 12px; background: currentColor; opacity: .22; border-radius: 0 3px 3px 0; transform-origin: left center; }
.dw-rng { position: absolute; top: 12px; height: 2px; background: currentColor; opacity: .55; }
.dw-rng::before, .dw-rng::after { content: ""; position: absolute; top: -4px; width: 2px; height: 10px; background: currentColor; }
.dw-rng::before { left: 0; }
.dw-rng::after { right: 0; }
.dw-dot { position: absolute; top: 13px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px #F3F0D8; }
.dw-val { font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.dw-val em { display: block; margin-top: 1px; font-style: normal; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 400; color: var(--muted); }
.dw-gap { height: 1px; background: var(--line); margin: 10px 0; }
.dw-ticks { position: relative; height: 18px; }
.dw-ticks b { position: absolute; top: 2px; transform: translateX(-50%); font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 400; color: var(--muted); }

/* Hover and focus pop-up (built by the page script) */
.tip {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  max-width: calc(100% - 16px);
  pointer-events: none;
  background: var(--navy);
  color: var(--cream-2);
  padding: 9px 12px 10px;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: 0 6px 18px rgba(8,37,70,.18);
}
.tip[hidden] { display: none; }
.tip strong { display: block; font-weight: 600; margin-bottom: 2px; }
.tip span { display: block; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: rgba(243,240,216,.82); }
.has-tip { cursor: default; }
.has-tip:focus { outline: none; }
.has-tip:focus-visible { outline: 2px solid var(--navy); }

/* Findings list */
.article .fl-title { margin: 26px 0 12px; font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; font-size: 20px; color: var(--navy); }
.fl { list-style: none; padding: 0; margin: 0 0 28px; border-top: 1px solid var(--line-strong); }
.fl li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17.5px;
  line-height: 1.5;
  color: rgba(8,37,70,.9);
}
.fl li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--navy); margin-top: 9px; }
.fl li:nth-child(3n+2)::before { background: var(--bluegrey); }
.fl li:nth-child(3n)::before { background: var(--slate); }
.fl strong { color: var(--navy); }

.article p.contact { padding: 20px 22px; background: var(--navy); color: var(--cream-2); font-weight: 500; }
.article p.contact a { color: var(--cream-2); border-bottom-color: rgba(243,240,216,.5); }

.article a.fn { border-bottom: 0; }

/* Notes */
.notes { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.article .notes p { font-size: 14.5px; line-height: 1.55; color: rgba(8,37,70,.72); margin: 0 0 12px; }
.article .notes .notes-k { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-bottom: 16px; }

/* Sources */
.refs li { padding: 0 0 12px 34px; font-size: 14.5px; }
.refs li::before { content: counter(ref, decimal-leading-zero); top: 2px; }

/* Newsletter and footer spacing as drawn */
.newsletter { margin-top: 64px; padding-bottom: 8px; }
.newsletter-input, .newsletter-btn { min-height: 46px; }
footer { margin-top: 40px; flex-wrap: wrap; gap: 8px 20px; }

/* Entrance motion: bars grow and dots fade in once the chart is on screen */
@media (prefers-reduced-motion: no-preference) {
  .js .anim .dot { opacity: 0; transform: scale(.4); transition: opacity .35s ease, transform .35s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i) * 6ms); }
  .js .anim .lg-worth, .js .anim .lg-paid, .js .anim .dw-bar, .js .anim .strip > span { transform: scaleX(0); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
  .js .anim .lg-paid { transition-delay: .25s; }
  .js .anim .dw-rng, .js .anim .dw-dot { opacity: 0; transition: opacity .4s ease .5s; }
  .js .anim.is-in .dot { opacity: 1; transform: none; }
  .js .anim.is-in .lg-worth, .js .anim.is-in .lg-paid,
  .js .anim.is-in .dw-bar, .js .anim.is-in .strip > span { transform: none; }
  .js .anim.is-in .dw-rng { opacity: .55; }
  .js .anim.is-in .dw-dot { opacity: 1; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .dots { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; justify-content: stretch; }
  .dot { width: 100%; height: auto; aspect-ratio: 1; }
  .fig:not(.fig-hero) { padding: 20px 16px 16px; }
  .lg-head { display: none; }
  .lg-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg-name, .lg-bar, .lg-deals { grid-column: 1 / -1; }
  .lg-num { text-align: left; align-self: start; }
  .oneoff { justify-content: flex-start; }
  .chip, .oneoff { white-space: normal; align-items: flex-start; }
  .chip svg, .oneoff svg { margin-top: 3px; }
  .lg-num::before {
    display: block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(8,37,70,.6);
    margin-bottom: 2px;
  }
  .lg-w::before { content: "Worth"; content: "Worth" / ""; }
  .lg-cost::before { content: "\00a0"; }
  .lg-pv::before { content: "Payments"; content: "Payments" / ""; }
  .lg-sh::before { content: "Share"; content: "Share" / ""; }
  .strip-lbl { display: none !important; }
  .dw-row, .dw-axis { grid-template-columns: minmax(0, 1fr) 70px; column-gap: 12px; }
  .dw-label { grid-column: 1 / -1; text-align: left; font-size: 13.5px; }
  .dw-axis span:first-child { display: none; }
  .steps { grid-template-columns: 1fr; }
  .st-in, .st-main, .st-out { min-height: 0; }
}

@media (max-width: 620px) {
  .article p { font-size: 18.5px; }
  footer { flex-direction: row; }
}

@media (max-width: 560px) {
  .newsletter-row { flex-direction: row; flex-wrap: wrap; }
  .newsletter-input { flex: 1 1 240px; }
  .newsletter-btn { width: auto; }
}
