/* Tackles, yards and belaying. Uses the tokens and type of style.css; this file
   adds the layout of a page read top to bottom with a drawing beside each idea,
   and the parts of the drawings themselves. */

.fund { max-width: 1480px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 44px); }

.topic { margin-top: 72px; }
.topic > header { max-width: 64ch; padding-top: 18px; border-top: 1px solid var(--ink); }
.topic-no { margin: 0; font-style: italic; color: var(--soft); }
.topic h2 { margin: 0.2rem 0 0.8rem; font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.08; letter-spacing: -0.015em; }
.topic > header p { margin: 0 0 0.8rem; }

/* A drawing on the left, the text it belongs to on the right. The drawing
   stays in view while its text scrolls past. */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; margin-top: 56px; }
.pair > .fig { position: sticky; top: 14px; }
.pair > .text { max-width: 60ch; font-size: 0.97rem; line-height: 1.6; }
.wide { margin-top: 56px; }
.wide > .text { max-width: 64ch; font-size: 0.97rem; line-height: 1.6; }

.fund h3 { margin: 0 0 0.5rem; font-weight: 400; font-size: 1.65rem; line-height: 1.15; letter-spacing: -0.01em; }
.fund h4 { margin: 1.5rem 0 0.3rem; font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.fund .text p { margin: 0 0 0.7rem; }
.fund .text ul { margin: 0 0 0.7rem; padding-left: 1.1rem; }
.fund .text li { margin-bottom: 0.4rem; }
.fund blockquote { margin: 0.9rem 0; padding: 0 0 0 14px; border-left: 2px solid var(--hemp); }
.fund blockquote p { margin: 0 0 0.3rem; }
.fund blockquote footer { font: 400 0.78rem/1.5 var(--sans); color: var(--soft); }
.fund .refs { margin-top: 1rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); }
.fund .refs b { font-weight: 600; color: var(--ink); }

.fund .fig svg { max-height: 86vh; }
.fund .fig figcaption { display: block; }

/* How each statement is sourced */
.mark { display: inline-block; margin-right: 0.45em; padding: 0 6px; border: 1px solid var(--green); font: 500 0.7rem/1.6 var(--sans); color: var(--green); white-space: nowrap; vertical-align: 0.08em; }
.mark.later { border-color: var(--hemp); color: #6d5b2f; }
.mark.infer { border-style: dashed; }
.mark.unverified { border-style: dashed; border-color: var(--soft); color: var(--soft); }
.marks-key { font: 400 0.78rem/2 var(--sans); color: var(--soft); }

/* The parts of a drawing */
.fd-beam { stroke: var(--wood); stroke-width: 5; stroke-linecap: round; }
.fd-deck { stroke: var(--ink); stroke-width: 1; opacity: 0.6; }
.fd-shell { fill: var(--sail); stroke: var(--wood); stroke-width: 1.4; }
.fd-sheave { fill: var(--sheet); stroke: var(--wood); stroke-width: 1; }
.fd-pin { fill: var(--wood); }
.fd-strap { stroke: var(--wood); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.fd-rope { stroke: var(--hemp); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.fd-rope.thin { stroke-width: 1.4; }
.fd-rope.thick { stroke-width: 4.5; }
.fd-rope.count { stroke: var(--red); }
.fd-rope.guess { stroke-dasharray: 5 4; }
.fd-yards .fd-rope { stroke-width: 1.3; }
.fd-yards .fd-rope.thick { stroke-width: 2.8; }
.fd-yards .fd-rope.thin { stroke-width: 0.9; }
.fd-tar { stroke: var(--ink); stroke-width: 2; opacity: 0.55; fill: none; stroke-linecap: round; }
.fd-wood { fill: var(--wood); }
.fd-woodline { stroke: var(--wood); stroke-linecap: round; fill: none; }
.fd-timber { fill: #cdbf9f; stroke: var(--wood); stroke-width: 1.2; stroke-linejoin: round; }
.fd-iron { fill: var(--ink); }
.fd-sail { fill: var(--sail); stroke: var(--soft); stroke-width: 0.8; }
.fd-hull { fill: var(--hull); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.fd-zone { fill: var(--hemp); fill-opacity: 0.16; stroke: var(--hemp); stroke-width: 1; }
.fd-zone.aloft { fill: var(--red); fill-opacity: 0.1; stroke: var(--red); }
.fd-load { fill: var(--hull); stroke: var(--ink); stroke-width: 1; }
.fd-fast { fill: var(--red); }
.fd-belay { fill: var(--green); stroke: var(--sheet); stroke-width: 1; }
.fd-belay.guess { fill: var(--sheet); stroke: var(--green); stroke-width: 1.8; }
.fd-arrow { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fd-lead { stroke: var(--soft); stroke-width: 0.7; fill: none; }
.fd-lbl { font: 400 11.5px var(--sans); fill: var(--soft); paint-order: stroke; stroke: var(--sheet); stroke-width: 3px; stroke-linejoin: round; }
.fd-lbl.strong { fill: var(--ink); font-weight: 600; }
.fd-lbl.red { fill: var(--red); font-weight: 600; }
.fd-lbl.green { fill: var(--green); font-weight: 600; }
.fd-badge { fill: var(--sheet); stroke: var(--red); stroke-width: 1; }
.fd-num { font: 600 10px var(--sans); fill: var(--red); text-anchor: middle; dominant-baseline: central; }

/* The tackle you can work */
.picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.8rem 0; }
.picker button {
  font: 500 0.82rem/1 var(--sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 7px 10px;
  cursor: pointer;
}
.picker button:hover { background: var(--sheet); }
.picker button[aria-pressed='true'] { background: var(--red); border-color: var(--red); color: #fff; }
.picker.variants button { border-color: var(--soft); font-weight: 400; }
.picker.variants button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); }
.picker-label { margin: 1rem 0 0; font: 600 0.76rem/1.3 var(--sans); color: var(--soft); }
.haul { display: block; margin: 1rem 0 0.4rem; font: 600 0.76rem/1.3 var(--sans); color: var(--soft); }
.haul input { display: block; width: 100%; margin-top: 8px; accent-color: var(--red); }
.readout { margin: 0.6rem 0 0; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); }
.readout .sum { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.readout .sum b { color: var(--red); font-weight: 400; }
.readout p { margin: 0.35rem 0 0; font-size: 0.92rem; }
.readout .gauge { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) 4.6rem; gap: 4px 10px; align-items: center; margin-top: 10px; font: 400 0.78rem/1.3 var(--sans); color: var(--soft); }
.gauge i { display: block; height: 7px; min-width: 1px; background: var(--hemp); }
.gauge i.lift { background: var(--red); }
.gauge span:nth-child(3n) { color: var(--ink); font-weight: 600; }
.about-purchase { margin-top: 1rem; }
.about-purchase h4 { margin-top: 0; }

/* Every purchase, drawn small */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 22px; }
.card { padding: 12px 14px 14px; background: var(--sheet); border: 1px solid var(--rule); font-size: 0.88rem; line-height: 1.5; }
.card svg { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto 8px; }
.card h4 { margin: 0 0 0.2rem; font-size: 1.02rem; }
.card p { margin: 0 0 0.35rem; }
.card .adv { font: 600 0.78rem/1.4 var(--sans); color: var(--red); }
.card .refs { margin: 0; padding: 0; border: 0; }
.card button { margin-top: 0.3rem; padding: 2px 0; font: 500 0.75rem/1 var(--sans); color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--hemp); cursor: pointer; }

/* The fittings a rope was belayed to */
.fittings { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 22px; }
.fitting { margin: 0; font-size: 0.88rem; line-height: 1.5; }
.fitting svg { display: block; width: 100%; height: auto; background: var(--sheet); border: 1px solid var(--rule); }
.fitting figcaption { padding-top: 6px; }
.fitting figcaption b { display: block; font-size: 1.02rem; }
.fitting .refs { display: block; }

.verbs { margin: 0; }
.verbs dt { margin-top: 0.7rem; font-weight: 700; }
.verbs dd { margin: 0; }

.fund table { border-collapse: collapse; width: 100%; margin: 0.6rem 0 1rem; font: 400 0.84rem/1.45 var(--sans); }
.fund th, .fund td { padding: 6px 12px 6px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
.fund thead th { border-top: 0; font-weight: 600; color: var(--soft); }
.fund tbody th { font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.fund-end { margin-bottom: 72px; }

@media (max-width: 900px) {
  .pair { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .pair > .fig { position: static; }
  .fund .fig svg { max-height: none; }
  .fund tbody th { white-space: normal; }
}

/* Tags stay inside a narrow column. */
.mark { white-space: normal; max-width: 100%; }
