/* CV-08 — P08 Service Kit commodity reference. Visual grammar inherited from samples/08-service-kit:
   paper canvas, 2 px ink rules, hard 9 px offset shadows, pastel module tints, Arial. */
:root {
  color-scheme: light;
  --ink: #14231d;
  --ink-soft: #31483e;
  --paper: #f3efe4;
  --paper-deep: #e4dece;
  --white: #fffdf8;
  --mint: #c9e6b2;
  --sky: #b8dfe8;
  --lilac: #d9c8ea;
  --apricot: #f1b18e;
  --sun: #f3ca62;
  --sand: #ead9a8;
  --rule: 2px solid var(--ink);
  --shadow: 9px 9px 0 var(--ink);
  --max: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-size: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

a,
button {
  font: inherit;
}

a {
  color: currentColor;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
}

[id] {
  scroll-margin-top: 1rem;
}

p,
h1,
h2,
h3,
li,
strong,
span,
a {
  overflow-wrap: anywhere;
}

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

h1,
h2,
h3 {
  line-height: 1.06;
}

button {
  color: inherit;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  transform: translateY(-180%);
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

html:not(.js) .js-only-control {
  display: none;
}

.js .js-only-control {
  display: inline-flex;
}

/* header */
.site-head {
  border-bottom: var(--rule);
  background: var(--paper);
}

.prototype-ribbon {
  margin: 0;
  padding: 0.65rem max(1rem, calc((100vw - var(--max)) / 2 + 3rem));
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.head-worktop {
  width: min(100%, var(--max));
  min-height: 86px;
  margin: 0 auto;
  padding: 0.75rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: var(--rule);
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1.4rem;
  font-weight: 900;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 1.28rem;
  letter-spacing: -0.04em;
}

.brand-copy span {
  color: var(--ink-soft);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font-weight: 800;
}

/* sections */
.workbench-section {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) 3rem;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-grid;
  place-items: center;
  min-width: 2.2rem;
  min-height: 2.2rem;
  margin-right: 0.6rem;
  border: 2px solid currentColor;
}

/* overview */
.overview {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: clamp(3rem, 5vw, 5rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 1 / 8;
}

.hero-copy h1 {
  max-width: 14ch;
  margin-bottom: 1.6rem;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.service-definition {
  max-width: 49rem;
  margin-bottom: 1rem;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.34;
}

.dataset-line {
  max-width: 45rem;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.boundary-strip {
  max-width: 47rem;
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem;
  border: var(--rule);
  border-left-width: 10px;
  background: var(--white);
  font-weight: 700;
}

.back-link-wrap {
  margin: 0;
}

.secondary-action,
.reset-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.secondary-action {
  background: var(--white);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.reset-action {
  margin-top: 1rem;
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.hero-spine {
  position: relative;
  z-index: 3;
  grid-column: 9 / 13;
  align-self: start;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border: var(--rule);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-spine p {
  margin: 0;
}

.spine-lead {
  font-weight: 700;
}

.spine-cap {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.spine-cap i {
  display: block;
  height: 2px;
  background: #fff;
}

.hero-assembly {
  position: relative;
  z-index: 1;
  grid-column: 3 / 13;
  min-height: 120px;
  margin-top: 1rem;
  border-top: var(--rule);
  border-bottom: var(--rule);
  background: var(--paper-deep);
}

.assembly-piece {
  position: absolute;
  bottom: 18px;
  border: var(--rule);
}

.piece-a {
  left: 6%;
  width: 22%;
  height: 60px;
  background: var(--mint);
}

.piece-b {
  left: 34%;
  width: 14%;
  height: 84px;
  background: var(--lilac);
}

.piece-c {
  left: 54%;
  width: 30%;
  height: 40px;
  background: var(--sky);
}

.assembly-rail {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  background: var(--ink);
}

/* shelf */
.section-intro {
  margin-bottom: 2rem;
}

.section-intro-copy h2 {
  max-width: 20ch;
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
  letter-spacing: -0.05em;
}

.section-intro-copy p {
  max-width: 48rem;
}

.illustrative-label {
  max-width: 48rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.module-workbench {
  padding: 1.2rem;
  border: var(--rule);
  background: var(--paper-deep);
  box-shadow: var(--shadow);
}

.module-shelf {
  display: grid;
  grid-template-columns: 4.5rem repeat(12, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 1rem;
}

.shelf-spine {
  grid-column: 1;
  grid-row: 1 / span 4;
  display: grid;
  place-items: center;
  border: var(--rule);
  background: var(--sun);
}

.shelf-spine span,
.summary-spine span,
.static-spine-marker > span {
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.shelf-spine span,
.summary-spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.module {
  min-width: 0;
  padding: 1.4rem;
  border: var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.module-top {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.module h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.module-scope {
  margin: 0;
}

/* unequal geometry: sized by explanatory role (columns 2-13 of the shelf grid) */
.module-energy {
  grid-column: 2 / 8;
  grid-row: 1;
  background: var(--mint);
}

.module-energy h2 {
  font-size: clamp(1.9rem, 3.4vw, 3.6rem);
}

.module-base-metals {
  grid-column: 8 / 14;
  grid-row: 1 / span 2;
  background: var(--lilac);
}

.module-base-metals h2 {
  font-size: clamp(1.7rem, 3vw, 3rem);
}

.module-bulk {
  grid-column: 2 / 5;
  grid-row: 2;
  background: var(--sky);
}

.module-bulk h2 {
  font-size: clamp(1.3rem, 2vw, 1.9rem);
}

.module-critical-minerals {
  grid-column: 5 / 8;
  grid-row: 2;
  background: var(--apricot);
}

.module-critical-minerals h2 {
  font-size: clamp(1.3rem, 2vw, 1.9rem);
}

.module-agri {
  grid-column: 2 / 14;
  grid-row: 3;
  background: var(--sand);
}

.module-agri h2 {
  font-size: clamp(2rem, 3.6vw, 3.8rem);
}

.module-agri .module-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.module-softs {
  grid-column: 2 / 14;
  grid-row: 4;
  background: var(--white);
}

.module-softs h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
}

.module-softs .module-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.module-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.module-label > span:first-child {
  display: inline-grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.9rem;
  margin-right: 0.35rem;
  border: 2px solid var(--ink);
}

.mini-diagram {
  width: 100%;
  max-width: 22rem;
  height: auto;
  max-height: 80px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.module-control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: transparent;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.module-control span:last-child {
  font-size: 1.5rem;
  line-height: 1;
}

.module-control[aria-expanded="true"] {
  border-bottom-style: double;
  border-bottom-width: 6px;
}

.module-sheet {
  padding: 1rem;
  border: var(--rule);
  background: var(--paper);
}

.js .module-sheet[data-open="false"] {
  display: none;
}

.module-sheet p {
  margin: 0;
}

.sheet-caption {
  font-weight: 900;
}

.sheet-links {
  margin: 0.6rem 0 0.8rem;
  padding-left: 1.25rem;
}

.sheet-links li + li {
  margin-top: 0.4rem;
}

.sheet-links a {
  display: inline-block;
  padding: 0.35rem 0;
}

.sheet-boundary {
  border-top: 2px solid var(--ink);
  padding-top: 0.6rem;
}

/* commodity records: bounded blocks inside the module */
.module-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.commodity {
  min-width: 0;
  padding: 1.2rem;
  border: var(--rule);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

.commodity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: var(--rule);
}

.cat-chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--ink);
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.commodity h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  letter-spacing: -0.03em;
}

.field-label {
  margin: 1rem 0 0.25rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field-label-questions {
  padding-top: 0.6rem;
  border-top: 2px solid var(--ink);
}

.commodity p {
  margin: 0;
}

.commodity ul,
.commodity ol {
  margin: 0;
  padding-left: 1.3rem;
}

.commodity li + li {
  margin-top: 0.35rem;
}

.price-line {
  padding: 0.8rem 1rem;
  border: var(--rule);
  border-left-width: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

.price-line strong {
  font-size: 1.35rem;
  font-weight: 900;
}

.questions {
  padding: 0.6rem 0.6rem 0.6rem 2rem;
  background: var(--paper);
  border: 2px dashed var(--ink);
}

.module.is-open .questions {
  border-style: solid;
  border-width: 3px;
}

.sources li {
  overflow-wrap: anywhere;
}

/* topics summary */
.topics-summary {
  grid-column: 1 / 14;
  grid-row: 5;
  display: grid;
  grid-template-columns: minmax(4.5rem, 0.16fr) 1fr;
  border: 2px solid #fff;
  background: var(--ink);
  color: #fff;
}

.topics-summary > div:last-child {
  padding: 1.6rem;
}

.topics-summary .module-label {
  color: #fff;
}

.topics-summary h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.8rem, 3.5vw, 3.4rem);
  letter-spacing: -0.05em;
}

.summary-spine {
  display: grid;
  place-items: center;
  border-right: 2px solid #fff;
  background: var(--sun);
  color: var(--ink);
}

#topics-live {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #fff;
}

#topics-live p,
#topics-live ul {
  margin-bottom: 0;
}

#topics-live ul {
  padding-left: 1.3rem;
}

/* static account */
.static-account {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 8px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.static-account-heading {
  grid-column: 1 / 7;
}

.static-account-heading h2 {
  max-width: 16ch;
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 3.4vw, 3.4rem);
  letter-spacing: -0.05em;
}

.static-list {
  grid-column: 7 / 13;
  margin: 0;
  padding: 1.4rem 1.4rem 1.4rem 2.6rem;
  border: var(--rule);
  background: var(--white);
}

.static-list > li + li {
  margin-top: 1rem;
}

.static-list ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.static-list a {
  display: inline-block;
  padding: 0.3rem 0;
}

.static-spine-marker {
  grid-column: 1 / 13;
  margin: 0;
  padding: 1rem 1.4rem;
  border: var(--rule);
  background: var(--sun);
  font-weight: 700;
}

.static-spine-marker > span {
  display: inline-block;
  margin-right: 0.8rem;
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--ink);
}

/* next step, limits, footer */
.next-step h2,
.limits h2 {
  max-width: 20ch;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
  letter-spacing: -0.05em;
}

.next-step-copy {
  max-width: 44rem;
  padding: 1.5rem;
  border: var(--rule);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.limits-copy {
  max-width: 52rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding: 1.5rem max(1rem, calc((100vw - var(--max)) / 2 + 3rem));
  border-top: var(--rule);
  background: var(--ink);
  color: #fff;
}

.site-footer p {
  margin: 0;
  font-weight: 700;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 800;
}

/* responsive: interleaved stack with visible group headings and recurring spine markers */
@media (max-width: 1100px) {
  .head-worktop,
  .workbench-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero-copy {
    grid-column: 1 / 13;
  }

  .hero-spine {
    grid-column: 1 / 13;
  }

  .hero-assembly {
    grid-column: 1 / 13;
  }

  .module-agri .module-items,
  .module-softs .module-items {
    grid-template-columns: 1fr;
  }

  .static-account-heading,
  .static-list {
    grid-column: 1 / 13;
  }
}

@media (max-width: 860px) {
  .module-shelf {
    grid-template-columns: 3.2rem repeat(12, minmax(0, 1fr));
  }

  .module-energy,
  .module-base-metals,
  .module-bulk,
  .module-critical-minerals,
  .module-agri,
  .module-softs {
    grid-column: 2 / 14;
    grid-row: auto;
  }

  .shelf-spine {
    grid-row: 1 / span 6;
  }

  .topics-summary {
    grid-column: 1 / 14;
    grid-row: auto;
  }
}

@media (max-width: 660px) {
  .workbench-section {
    width: 100%;
    padding: 2.5rem 1rem;
  }

  .head-worktop {
    padding: 0.75rem 1rem;
  }

  .module-workbench {
    padding: 0.75rem;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .module-shelf {
    display: block;
  }

  .shelf-spine {
    display: block;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
  }

  .shelf-spine span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .module {
    margin-bottom: 1rem;
    padding: 1rem;
  }

  /* purposeful insets: alternate module edges instead of a flat card list */
  .module-energy,
  .module-agri {
    margin-right: 0.75rem;
  }

  .module-base-metals,
  .module-softs {
    margin-left: 0.75rem;
  }

  .module-bulk,
  .module-critical-minerals {
    margin-left: 1.5rem;
  }

  .module h2 {
    font-size: 1.5rem;
  }

  .commodity {
    padding: 0.9rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .topics-summary {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }

  .summary-spine {
    padding: 0.5rem;
    border-right: 0;
    border-bottom: 2px solid #fff;
  }

  .summary-spine span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .static-account {
    display: block;
  }

  .static-list {
    margin-top: 1rem;
    padding-left: 2rem;
  }

  .static-spine-marker {
    margin-top: 1rem;
  }

  .hero-spine {
    box-shadow: 5px 5px 0 var(--ink);
  }

  .next-step-copy {
    box-shadow: 5px 5px 0 var(--ink);
  }
}

@media (max-width: 360px) {
  .module-bulk,
  .module-critical-minerals {
    margin-left: 0.75rem;
  }
}

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

  .skip-link {
    transform: none;
    top: -10rem;
  }

  .skip-link:focus {
    top: 0.75rem;
  }
}

@media (forced-colors: active) {
  :root {
    --ink: CanvasText;
    --ink-soft: CanvasText;
    --paper: Canvas;
    --paper-deep: Canvas;
    --white: Canvas;
    --mint: Canvas;
    --sky: Canvas;
    --lilac: Canvas;
    --apricot: Canvas;
    --sun: Canvas;
    --sand: Canvas;
  }

  :focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }

  .hero-assembly,
  .mini-diagram {
    display: none;
  }

  .secondary-action,
  .reset-action,
  .module-control {
    forced-color-adjust: auto;
  }
}

.module-foot {
  margin-top: 0.2rem;
  border-top-width: 6px;
  border-top-style: double;
}
