/* ─────────────────────────────────────────────────────────────
   Plumbline Systems — home page only.
   The header's contact action, and the evidence demonstration.
   Kept apart from /assets/site.css, which every page shares.
   Every colour behind text is opaque, so contrast is what it measures.
   Only the faces in /fonts/ are used, at the weights they ship:
   Newsreader 400, Archivo 600 and 700, IBM Plex Mono 400. No italics:
   no italic face is installed, and none is synthesised.
   ───────────────────────────────────────────────────────────── */

/* ── the header stays on screen ─────────────────────────────── */
/* The header's wrapper is a child of body, so it can stick for the whole page. Anchored sections
   stop below it. Below 66em, where the nav sits behind the menu button, a Contact action stays in
   the header; below 26em the menu button shows its icon only (its name is still read out). */
/* Only where there is height to spare: the query is in em, so with enlarged text or a phone on its
   side the header scrolls away with the page instead of covering a large part of the screen. */
@media (min-height: 30em){
  html{ scroll-padding-top: 5rem; }
  #top{ position: sticky; top: 0; z-index: 20; }
}
.header-cta{
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; min-width: 2.75rem; margin-left: auto; padding: 0 .875rem;
  font-size: 1rem; line-height: 1.2;
  color: var(--gun); background: var(--ivory); border-radius: 2px;
  text-decoration: none;
}
.header-cta svg{ display: none; width: 1.375rem; height: 1.375rem; }
.header-cta:hover{ background: #fff; }
/* the narrowest phones: the action keeps its name for assistive technology and shows its icon */
@media (max-width: 21.99em){
  .header-cta{ padding: 0; }
  .header-cta svg{ display: block; }
  .header-cta-text{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 25.99em){
  .header-inner{ gap: 0 .5rem; }
  .menu-link{ justify-content: center; min-width: 2.75rem; gap: 0; }
  .menu-text{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 66em){ .header-cta{ display: none; } }

/* ── 2. the demonstration ───────────────────────────────────── */
/* Source order is the phone order: heading and the one-paragraph scope, the panel, then the three
   steps. From 60em the heading and the steps share the left column and the panel takes the right. */
.demo-band{ padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(2.5rem, 5vw, 4rem); }
.demo-lede{ margin-top: .875rem; max-width: 32rem; font-size: clamp(1.1875rem, 1.1rem + .4vw, 1.3125rem); line-height: 1.45; color: var(--ink); }
.demo-scope{ margin-top: .75rem; max-width: 32rem; font-size: 1rem; line-height: 1.55; }
.demo-stage{ margin-top: 1.5rem; margin-inline: calc(-1 * var(--gutter)); }

.demo-band .approach{ padding: 0; margin-top: 2rem; }
.demo-band .steps{ display: block; margin-top: .75rem; }
.demo-band .step{
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0 1rem;
  padding: 1rem 0 1rem .75rem; border-top: 1px solid var(--rule-light); border-left: 0;
  /* the lit mark: a brass rule at the left edge. It never changes the step's size or position. */
  box-shadow: inset 2px 0 0 transparent;
  transition: box-shadow .4s ease;
}
.demo-band .step:first-child{ padding-left: .75rem; }
.demo-band .step:last-child{ padding: 1rem 0 1rem .75rem; }
.demo-band .step-mark{ display: block; margin: 0; }
.demo-band .step-icon{ margin-top: .125rem; }
.demo-band .step-h{ margin: 0; }
.demo-band .step-mark::after{ content: none; }
.demo-band .step-h{ font-size: clamp(1.375rem, 1.25rem + .6vw, 1.625rem); }
.demo-band .step p{ max-width: 30rem; }
.demo-band .step.is-lit{ box-shadow: inset 2px 0 0 var(--brass-dark); }
.demo-band .step.is-lit .step-icon{ color: var(--ink); }

@media (min-width: 37.5em){
  .demo-stage{ margin-inline: 0; }
}
@media (min-width: 60em){
  .demo-grid{
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr; gap: 0 4rem;
  }
  .demo-head-copy{ grid-column: 1; grid-row: 1; }
  .demo-stage{ grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .demo-band .approach{ grid-column: 1; grid-row: 2; align-self: start; }
}
/* wide and tall: the steps travel beside the panel while it is read, below the sticky header */
@media (min-width: 60em) and (min-height: 40em){
  .demo-band .approach{ position: sticky; top: 6rem; }
}

/* the panel */
.demo{
  --focus: var(--btn-top);
  background: var(--gun); color: var(--ivory-soft);
  border-top: 2px solid var(--brass);
  padding: 1rem var(--gutter) 1.25rem;
}
@media (min-width: 37.5em){ .demo{ padding: 1.125rem 1.5rem 1.5rem; } }
.demo-head{ display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.5rem; }
.demo-title{
  font-family: var(--ui); font-stretch: 100%; font-weight: 700;
  font-size: .8125rem; line-height: 1.5; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass);
}
.demo-file{ font-family: var(--mono); font-size: .8125rem; line-height: 1.5; color: var(--ivory-soft); }

.demo-filters{ margin-top: .875rem; padding-top: .875rem; border-top: 1px solid var(--rule-dark); }
.demo-filter{ display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.demo-filter + .demo-filter{ margin-top: .625rem; }
@media (min-width: 37.5em){ .demo-flabel{ flex-basis: 4.25rem; } }
.demo-flabel{ flex: 0 0 100%; font-family: var(--mono); font-size: .8125rem; line-height: 1.4; color: var(--ivory-soft); }
.demo-opt{
  min-height: 2.75rem; min-width: 2.75rem; padding: .375rem .75rem;
  font-family: var(--ui); font-variation-settings: "wdth" 100; font-weight: 600;
  font-size: .9375rem; line-height: 1.25;
  color: var(--ivory); background: #1A2322;
  border: 1px solid #6E7671; border-radius: 2px;
  cursor: pointer;
}
.demo-opt:hover{ border-color: var(--btn-top); }
.demo-opt[aria-pressed="true"]{ color: var(--gun); background: var(--btn-top); border-color: var(--btn-top); }
/* without JavaScript: the same colours (so the same contrast), a dashed edge, and no pointer */
.demo-opt[disabled]{ cursor: default; border-style: dashed; }
.demo-opt[disabled]:hover{ border-color: #6E7671; }
.demo-opt[disabled][aria-pressed="true"]:hover{ border-color: var(--btn-top); }
.demo-note{ margin-top: .625rem; font-size: 1rem; line-height: 1.5; color: var(--ivory-soft); }

.demo-readout{ margin-top: .875rem; font-size: 1.0625rem; line-height: 1.45; color: var(--ivory); }

.demo-cats{ margin-top: .875rem; border-bottom: 1px solid var(--rule-dark); }
.demo-cat{ border-top: 1px solid var(--rule-dark); }
.demo-cat > summary{
  display: grid; grid-template-columns: minmax(2.75rem, max-content) minmax(0, 1fr) 1.25rem;
  grid-template-areas: "n name mark" "n share mark";
  align-items: center; gap: 0 .875rem;
  min-height: 3.5rem; padding: .5rem .75rem .5rem .5rem;
  list-style: none; cursor: pointer;
  background: var(--gun);
}
.demo-cat > summary::-webkit-details-marker{ display: none; }
.demo-cat > summary::after{
  grid-area: mark; content: "+"; justify-self: end;
  font-family: var(--mono); font-size: 1.25rem; line-height: 1; color: var(--brass);
}
.demo-cat[open] > summary::after{ content: "\2212"; }
.demo-cat > summary:hover{ background: #18211F; }
.demo-cat[open] > summary{ background: #1A2322; box-shadow: inset 2px 0 0 var(--brass); }
.demo-n{ grid-area: n; font-family: var(--mono); font-size: 1.625rem; line-height: 1; color: var(--btn-top); }
.demo-cname{ grid-area: name; font-size: 1.125rem; line-height: 1.3; color: var(--ivory); }
.demo-share{ grid-area: share; font-family: var(--mono); font-size: .8125rem; line-height: 1.5; color: var(--ivory-soft); }
/* narrow, or enlarged text (the breakpoint is in em, so 200% text reaches it at twice the width):
   the number and the marker share the first line, the name and its share run full width below */
@media (max-width: 22em){
  .demo-cat > summary{ grid-template-columns: minmax(0, 1fr) 1.25rem; grid-template-areas: "n mark" "name name" "share share"; padding-left: .75rem; }
  .demo-title{ letter-spacing: .1em; }
}
.demo-cat--review .demo-n{ color: #F2B8A8; }
.demo-cat--excluded .demo-n{ color: var(--ivory-soft); }

.demo-panel{ padding: .125rem .75rem 1rem 1.25rem; background: #1A2322; box-shadow: inset 2px 0 0 var(--brass); }
.demo-recs > li{ padding-block: .75rem; border-top: 1px solid var(--rule-dark); }
.demo-recs > li:first-child{ border-top: 0; }
.demo-meta{ display: flex; flex-wrap: wrap; gap: 0 .875rem; font-family: var(--mono); font-size: .8125rem; line-height: 1.6; color: var(--ivory-soft); }
.demo-id{ color: var(--btn-top); }
.demo-text{ margin-top: .25rem; font-size: 1.0625rem; line-height: 1.5; color: var(--ivory); }
.demo-text mark{ padding: 0 .125em; border-radius: 1px; background: var(--btn-top); color: var(--gun); }
.demo-why{ margin-top: .25rem; font-size: .9375rem; line-height: 1.5; color: var(--ivory-soft); overflow-wrap: anywhere; }
.demo-reason{
  margin-top: .75rem;
  font-family: var(--ui); font-stretch: 100%; font-weight: 700;
  font-size: .8125rem; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase;
  color: #F2B8A8;
}
.demo-shown{ padding-top: .625rem; border-top: 1px solid var(--rule-dark); font-family: var(--mono); font-size: .8125rem; line-height: 1.5; color: var(--ivory-soft); }
.demo-recs + .demo-shown{ margin-top: 0; }
.demo-reconcile{ margin-top: .75rem; font-size: 1rem; line-height: 1.5; color: var(--ivory-soft); }
.demo-thin{ margin-top: .875rem; padding: 1rem; background: #1A2322; box-shadow: inset 2px 0 0 #F2B8A8; font-size: 1.0625rem; line-height: 1.5; color: var(--ivory); }
.demo-thin .demo-n{ color: #F2B8A8; }

.demo-rules{ margin-top: 1rem; }
.demo-rules > summary{
  display: inline-flex; align-items: center; min-height: 2.75rem;
  cursor: pointer; list-style: none;
  font-family: var(--ui); font-variation-settings: "wdth" 100; font-weight: 600;
  font-size: .9375rem; color: var(--ivory);
  text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: .3em;
}
.demo-rules > summary::-webkit-details-marker{ display: none; }
.demo-rules > summary::after{ content: "+"; margin-left: .5rem; font-family: var(--mono); color: var(--brass); }
.demo-rules[open] > summary::after{ content: "\2212"; }
.demo-rules dl{ margin-top: .25rem; }
.demo-rules dl > div{ display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0 .75rem; padding-block: .5rem; border-top: 1px solid var(--rule-dark); }
.demo-rules dt{ font-family: var(--mono); font-size: .875rem; line-height: 1.6; color: var(--btn-top); }
.demo-rules dd{ font-size: .9375rem; line-height: 1.5; color: var(--ivory-soft); }

/* the evidence band: the one line that keeps the console's limits apart from the demonstration */
.limits-note{ margin-top: .875rem; max-width: 46rem; font-size: 1rem; line-height: 1.55; }

@media (prefers-reduced-motion: reduce){
  .demo-band .step{ transition: none; }
}
