/* Homepage section 2 (#problem): "Right by chance / Right by design" distribution pair.
   From the operator's design "ametriq-pricing-products.html" (2026-10-09): the same 64-product
   portfolio twice, as stacks of squares over a shared target band. Before: 26 under / 12 in
   range / 26 over. After: 8 / 48 / 8. Pure HTML/CSS; the squares are in the markup.
   Colours, spacing and shapes are the design's own; type uses the site's Helvetica Neue.
   After the 2026-10-09 Impeccable + Practical UI critique: no text under 12px (labels 13-14px,
   captions 17px), title 600 so it does not outweigh the hero, band with 3:1 dashed edges.
   Second pass: counts under the headings, a Target range bracket, amber edges at 3:1,
   8px-scale spacing, and type and width that grow on screens wider than 1440. */

.amq-dist-wrap { border-top: 1px solid #E5E2D8; background: #FFFFFF; }

.amq-dist {
  --amq-ink: #18251f;
  --amq-green: #00543f;
  --amq-amber: #f2b929;
  --amq-red: #bc4128;
  --amq-orange: #f39a26;
  --amq-muted: #64716b;
  --amq-line: #dce4df;
  --amq-band: #e2ece5;
  --amq-band-edge: #5f8c78;
  color-scheme: light;
  box-sizing: border-box;
  width: 100%;
  max-width: clamp(1120px, calc(45vw + 472px), 1360px);
  margin: 0 auto;
  padding: 56px 48px 40px;
  color: var(--amq-ink);
}
.amq-dist * { box-sizing: border-box; }

.amq-dist-intro { text-align: center; margin: 0 auto 48px; }
/* operator, 2026-10-09: the label sits under the title, not above it */
.amq-dist-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 16px 0 0; color: var(--amq-green); font-size: 13px;
  line-height: 1.5; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.amq-dist-eyebrow::before { content: ""; height: 8px; width: 8px; background: var(--amq-orange); }
.amq-dist h2 {
  margin: 0; color: var(--amq-ink); font-size: clamp(30px, calc(18px + 1.67vw), 48px);
  font-weight: 600; line-height: 1.12; letter-spacing: -1.2px; text-wrap: balance;
}
.amq-dist h2 span { color: var(--amq-green); }

.amq-dist-comparison {
  display: grid; grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
  align-items: stretch; gap: 0;
}
.amq-dist-panel { min-width: 0; margin: 0; }
.amq-dist-panel-heading { text-align: center; margin-bottom: 24px; }
.amq-dist-method {
  margin: 0 0 8px; font-size: 14px; line-height: 1.5;
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #4c5a53;
}
.amq-dist-panel:last-child .amq-dist-method { color: var(--amq-green); }
.amq-dist h3 {
  margin: 0; color: var(--amq-ink); font-size: clamp(25px, calc(13px + .83vw), 29px); font-weight: 600;
  line-height: 1.2; letter-spacing: -.7px;
}

.amq-dist-plot {
  position: relative; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 4px; aspect-ratio: 1.42; padding-bottom: 8px;
  border-bottom: 1px solid #8b9891;
}
/* the target band: the middle five of fifteen columns, identical in both panels */
.amq-dist-plot::before {
  content: ""; position: absolute; left: 33.333333%; width: 33.333333%;
  top: 0; bottom: 0; background: var(--amq-band);
  border-left: 1px dashed var(--amq-band-edge); border-right: 1px dashed var(--amq-band-edge);
}
.amq-dist-col {
  position: relative; display: flex; flex-direction: column-reverse;
  justify-content: flex-start; gap: 4px; min-width: 0;
}
.amq-dist-sq { display: block; width: 100%; aspect-ratio: 1; flex: 0 0 auto; }
.amq-dist-col[data-category="low"] .amq-dist-sq { background: var(--amq-amber); box-shadow: inset 0 0 0 1px #a87700; }
.amq-dist-col[data-category="range"] .amq-dist-sq { background: var(--amq-green); }
.amq-dist-col[data-category="high"] .amq-dist-sq { background: var(--amq-red); }
.amq-dist-axis {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: center; gap: 4px; margin-top: 16px; color: var(--amq-muted);
  font-size: clamp(14px, calc(8px + .42vw), 16px); line-height: 1.4; font-weight: 600;
}
.amq-dist-axis span:nth-child(2) { color: var(--amq-green); }
.amq-dist-copy {
  margin: 24px auto 0; max-width: 42ch; text-align: center;
  font-size: clamp(17px, calc(11px + .42vw), 19px); line-height: 1.55; color: #56635c; text-wrap: balance;
}

/* count under each heading: the figure a reader can take away (illustrative) */
.amq-dist-count { margin: 10px 0 0; color: var(--amq-muted); font-size: 16px; line-height: 1.4; }
.amq-dist-count b { color: var(--amq-ink); font-size: 1.25em; font-weight: 700; font-variant-numeric: tabular-nums; }
.amq-dist-panel:last-child .amq-dist-count b { color: var(--amq-green); }
.amq-dist-count span {
  margin-left: 6px; padding: 2px 6px; border: 1px solid var(--amq-line); border-radius: 3px;
  font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--amq-muted); vertical-align: 2px;
}
/* "Target range" bracket over the middle third, joined to the band's dashed edges */
.amq-dist-bandlabel {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0;
  color: var(--amq-green); font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  line-height: 1.4; text-align: center; text-transform: uppercase;
}
.amq-dist-bandlabel span { grid-column: 2; }
.amq-dist-bandlabel span::after {
  content: ""; display: block; height: 10px; margin-top: 4px;
  border: 1px dashed var(--amq-band-edge); border-bottom: 0;
}

.amq-dist-divider { position: relative; display: flex; justify-content: center; }
.amq-dist-divider::before {
  content: ""; position: absolute; top: 81px; bottom: 18px; width: 1px; background: var(--amq-line);
}
/* solid green disc with a drawn arrow (a text glyph sat off-centre and read thin);
   the white ring keeps the divider line from touching the disc */
.amq-dist-arrow {
  position: absolute; top: 46%; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--amq-green); color: #fff; transform: translateY(-50%);
  box-shadow: 0 0 0 6px #fff, 0 10px 22px -10px rgba(0, 84, 63, .55);
}
.amq-dist-arrow svg { display: block; width: 24px; height: 24px; }

/* side by side: both panels share one set of rows (subgrid), so the two plots line up
   and the arrow sits in the plot row, centred on the charts rather than the column */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 640.02px) {
    .amq-dist-comparison { grid-template-rows: repeat(5, auto); }
    .amq-dist-panel { display: grid; grid-row: 1 / span 5; grid-template-rows: subgrid; }
    .amq-dist-panel:first-child { grid-column: 1; }
    .amq-dist-panel:last-child { grid-column: 3; }
    .amq-dist-divider { grid-column: 2; grid-row: 1 / span 5; display: grid; grid-template-rows: subgrid; justify-content: center; }
    .amq-dist-arrow { position: relative; top: auto; grid-row: 3; align-self: center; transform: none; }
    .amq-dist-divider::before { left: 50%; margin-left: -.5px; }
  }
}

.amq-dist-note {
  text-align: center; margin: 32px 0 0; font-size: clamp(13px, calc(7px + .42vw), 15px); line-height: 1.6; color: var(--amq-muted);
}
.amq-dist-close {
  text-align: center; border-top: 1px solid var(--amq-line); margin: 32px 0 0;
  padding-top: 32px; font-size: clamp(19px, calc(13px + .42vw), 21px); line-height: 1.4; font-weight: 500;
  letter-spacing: -.4px; color: var(--amq-ink);
}
.amq-dist-close span { color: var(--amq-green); }

/* 641-700px: a third of the panel is narrower than "Strategically" at 14px */
@media (min-width: 640.02px) and (max-width: 700px) {
  .amq-dist-axis { font-size: 12px; }
}
@media (max-width: 640px) {
  .amq-dist { padding: 32px 22px; }
  .amq-dist-intro { margin-bottom: 34px; }
  .amq-dist h2 { font-size: 32px; letter-spacing: -1px; }
  .amq-dist-eyebrow { font-size: 12px; letter-spacing: 1.2px; }
  .amq-dist-method { font-size: 13px; }
  .amq-dist-axis { font-size: 13px; }
  .amq-dist-comparison { grid-template-columns: minmax(0, 1fr); }
  .amq-dist-panel { width: 100%; max-width: 420px; margin: 0 auto; }
  .amq-dist-panel-heading { margin-bottom: 19px; }
  .amq-dist-copy { margin-top: 16px; font-size: 16px; }
  .amq-dist-count { font-size: 15px; }
  .amq-dist-divider { height: 76px; align-items: center; }
  .amq-dist-divider::before { top: 38px; bottom: auto; height: 1px; width: 100%; max-width: 420px; }
  .amq-dist-arrow { top: 38px; width: 48px; height: 48px; transform: translateY(-50%) rotate(90deg); }
  .amq-dist-note { margin-top: 26px; }
  .amq-dist-close span { display: block; }
}
@media (max-width: 360px) {
  .amq-dist { padding-right: 17px; padding-left: 17px; }
  .amq-dist h2 { font-size: 29px; }
}
