/* ==========================================================================
   How we invest (our-investment-criteria/), round 36
   The page now follows the rest of the site: a short, still night band, then
   four anchored sections on paper under the shared tab row. The fund's sizes
   keep the engraver's scale bar, ruled in ink on a light term sheet; the
   criteria for companies and transactions are set as a keyed legend.
   Loaded after rivers.css and before frame.css.
   ========================================================================== */

.drp-invest-page main { display: block; }

/* narrow screens: the six states as one compact row of chips, so the criteria start sooner */
@media only screen and (max-width: 759px) {
  .drp-invest-page .ph-split { gap: 20px; }
  .drp-invest-page .ph-states-h { margin-bottom: 10px; font-size: 16px; }
  .drp-invest-page .ph-states { display: flex; flex-wrap: wrap; gap: 6px; max-width: none; }
  .drp-invest-page .ph-states li { padding: 4px 10px; font-size: 13.5px; }
  .drp-invest-page .ph-states-note { margin-top: 10px; font-size: 13.5px; }
}

/* ---------- I. the term sheet: a double-ruled box, as the neatline was ---------- */
.iv-term {
  position: relative;
  display: grid;
  gap: clamp(28px, 3.4vw, 44px) clamp(40px, 5vw, 80px);
  padding: clamp(26px, 3.4vw, 48px) clamp(22px, 3.6vw, 52px);
  border: 1px solid var(--ink);
  background: #fff;
}
.iv-term:before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.iv-term > * { position: relative; }
@media only screen and (min-width: 1100px) {
  .iv-term { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: stretch; }
}

/* ---------- the scale of the fund, in ink ---------- */
.scale { --iv-bar: var(--ink); margin: 0; }
.scale-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "name" "track" "note";
  margin: 0 0 clamp(24px, 2.8vw, 34px);
}
.scale-name {
  grid-area: name;
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.3;
}
.scale-track { grid-area: track; position: relative; }
.scale-note { grid-area: note; margin: 10px 0 0; max-width: 36em; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* the values, set at the two ends of their bar */
.scale-v {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px calc(var(--a) / var(--max) * 100%);
  width: calc((var(--b) - var(--a)) / var(--max) * 100%);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(22px, 2.5vw, 38px);
  line-height: 1;
  white-space: nowrap;
}
.scale-sep {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.scale-lo { transform: translateX(-0.04em); }
.scale-hi { margin-left: auto; }

/* the bar: a ruled strip in alternate filled and open divisions, one to each million */
.scale-bar {
  position: relative;
  display: flex;
  height: 12px;
  margin-left: calc(var(--a) / var(--max) * 100%);
  width: calc((var(--b) - var(--a)) / var(--max) * 100%);
}
.scale-bar:before { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--iv-bar); }
.scale-bar i { flex: 1 1 0; transform-origin: 0 50%; }
.scale-bar i:nth-child(odd) { background: var(--iv-bar); }
.scale-row-b .scale-bar i:nth-child(odd) { background: #9A7A3E; }
.scale-row-b .scale-bar:before { box-shadow: inset 0 0 0 1px #9A7A3E; }

/* past fifteen: more, with capital from others */
.scale-more {
  position: absolute;
  bottom: 0;
  left: calc(var(--b) / var(--max) * 100%);
  width: calc((var(--max) - var(--b)) / var(--max) * 100%);
  height: 12px;
  background: repeating-linear-gradient(90deg, #9A7A3E 0 5px, transparent 5px 10px) 0 50% / calc(100% - 9px) 1px no-repeat;
}
.scale-more:after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -4px;
  border-left: 8px solid #9A7A3E;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* the ruler shared by both bars, a division to each million */
.scale-row-ruler { margin-bottom: 10px; }
.scale-row-ruler .scale-name { display: none; }
.scale-ruler {
  position: relative;
  display: block;
  height: 8px;
  border-top: 1px solid var(--muted);
  background: linear-gradient(90deg, rgba(86, 100, 114, 0.55) 1px, transparent 1px) 0 0 / calc(100% / var(--max)) 6px repeat-x;
}
.scale-ruler:after { content: ""; position: absolute; right: 0; top: -1px; width: 1px; height: 7px; background: var(--muted); }
.scale-ruler i {
  position: absolute;
  top: -1px;
  left: calc(var(--v) / var(--max) * 100%);
  width: 1px;
  height: 13px;
  background: var(--ink);
}
.scale-cap { margin: 0; color: var(--muted); font: italic 400 14px/1.4 var(--serif); }
@media only screen and (min-width: 760px) {
  .scale { --name-w: clamp(150px, 15vw, 210px); --name-gap: clamp(20px, 2.6vw, 40px); }
  .scale-row {
    grid-template-columns: var(--name-w) minmax(0, 1fr);
    grid-template-areas: "name track" ". note";
    column-gap: var(--name-gap);
    align-items: end;
  }
  .scale-name { margin: 0; transform: translateY(5px); }
  .scale-row-ruler .scale-name { display: block; }
  .scale-cap { padding-left: calc(var(--name-w) + var(--name-gap)); }
}

/* ruled once as the scale comes into view (sheet.js); otherwise ruled already */
.scale.is-armed .scale-bar:before,
.scale.is-armed .scale-more { clip-path: inset(0 100% 0 0); }
.scale.is-armed .scale-bar i { transform: scaleX(0); }
.scale.is-armed .scale-v,
.scale.is-armed .scale-note { opacity: 0; }
.scale.is-armed.is-drawn .scale-bar:before { clip-path: inset(0 0 0 0); transition: clip-path 0.8s cubic-bezier(0.45, 0, 0.2, 1) 0.1s; }
.scale.is-armed.is-drawn .scale-row-b .scale-bar:before { transition-delay: 0.5s; }
.scale.is-armed.is-drawn .scale-bar i { transform: scaleX(1); transition: transform 0.28s ease-out calc(0.15s + var(--i) * 0.05s); }
.scale.is-armed.is-drawn .scale-v,
.scale.is-armed.is-drawn .scale-note { opacity: 1; transition: opacity 0.7s ease 0.2s; }
.scale.is-armed.is-drawn .scale-row-b .scale-v,
.scale.is-armed.is-drawn .scale-row-b .scale-note { transition-delay: 0.6s; }
.scale.is-armed.is-drawn .scale-more { clip-path: inset(0 0 0 0); transition: clip-path 0.6s ease-out 1.2s; }

/* ---------- structure and region, beside the scale ---------- */
.iv-pair { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; margin: 0; }
.iv-pair > div { padding: 18px 0 20px; border-top: 1px solid var(--ink); }
.iv-pair > div + div { border-top-color: var(--rule); }
.iv-pair dt {
  margin: 0 0 8px;
  color: var(--muted);
  font: 600 12px/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.iv-pair dd { margin: 0; color: var(--slate); font-size: 15.5px; line-height: 1.55; }
.iv-pair .v { display: block; margin: 0 0 6px; color: var(--ink); font: 400 clamp(23px, 2vw, 28px)/1.15 var(--display); }
@media only screen and (min-width: 760px) and (max-width: 1099px) {
  .iv-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .iv-pair > div + div { border-top-color: var(--ink); }
}
@media only screen and (min-width: 1100px) {
  .iv-pair { padding-left: clamp(28px, 3vw, 44px); border-left: 1px solid var(--rule); }
}

/* ---------- II and III: each criterion keyed in the engraver's italic ---------- */
.iv-sec .sec-head--split .sec-lede { max-width: 42em; color: var(--slate); }
.iv-legend { margin: 0; columns: 1; column-gap: clamp(32px, 3.4vw, 56px); }
.iv-legend > div {
  break-inside: avoid;
  padding: 18px 0 22px;
  border-top: 1px solid var(--ink);
}
.iv-legend dt {
  margin: 0 0 8px;
  color: var(--ink);
  font: italic 400 20px/1.3 var(--serif);
}
.iv-legend dd { margin: 0; color: var(--slate); font-size: 15.5px; line-height: 1.62; }
.iv-legend dd p { margin: 0 0 8px; }
.iv-legend dd p:last-child { margin-bottom: 0; }
.iv-legend ul, .iv-legend ol { margin: 0 0 8px; padding: 0; list-style: none; }
.iv-legend ul:last-child, .iv-legend ol:last-child { margin-bottom: 0; }
.iv-legend li { position: relative; margin: 0 0 3px; padding-left: 20px; }
.iv-legend ul li:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 9px;
  height: 1px;
  background: var(--ink);
}
.iv-legend ol { counter-reset: pref; }
.iv-legend ol li { counter-increment: pref; }
.iv-legend ol li:before {
  content: counter(pref);
  position: absolute;
  left: 0;
  top: 0;
  color: #9A7A3E;
  font: 400 15px/1.62 var(--serif);
}
.iv-legend em { font-style: normal; font-weight: 600; color: var(--ink); }
@media only screen and (min-width: 700px) { .iv-legend { columns: 2; } }
@media only screen and (min-width: 1100px) { .iv-legend { columns: 3; } }

/* ---------- IV. inquiries, routed to Kevin and Joseph ---------- */
.drp-invest-page .iv-reach { scroll-margin-top: -16px; }
.drp-invest-page .iv-reach .sec-title { margin: 0 0 14px; }
.drp-invest-page .iv-reach .iv-reach-note { margin: 0; color: var(--muted); font-size: 17px; }
.drp-invest-page .iv-reach .btns { margin-top: 26px; }
.drp-invest-page .iv-reach .person .p-name a { display: inline; color: var(--ink); font-size: inherit; line-height: inherit; text-decoration: none; }
.drp-invest-page .iv-reach .person .p-name a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  .scale.is-armed .scale-bar:before, .scale.is-armed .scale-more { clip-path: none; }
  .scale.is-armed .scale-bar i { transform: none; }
  .scale.is-armed .scale-v, .scale.is-armed .scale-note { opacity: 1; }
  .scale.is-armed .scale-bar:before, .scale.is-armed .scale-bar i,
  .scale.is-armed .scale-v, .scale.is-armed .scale-note, .scale.is-armed .scale-more { transition: none !important; }
}
@media print {
  .iv-term { border-color: #000; }
  .iv-legend { columns: 2; }
}
