/* CaseModel website - css/p-open.css
   The first act, "A case is connections" (js/open.js). Every class here starts op-.
   threads: three pages from one week, their marked phrases as handles, the threads a visitor draws between them, and the
   date, the clause and the dollar that follow on from the email.
   mind: the whole matter is drawn by the field of squares behind the page; these rules only lay the words over it. */

/* ======================================================================================
   threads: three pages, two connections
   ====================================================================================== */
.op-th .fig-bar { min-height: 56px; }
.op-show { display: inline-flex; align-items: center; min-height: 40px; }

/* the pages, and the gutter the threads run through. Stacked, the threads run down a lane at the left. */
.op-board { position: relative; padding-left: 30px; touch-action: manipulation; }
.op-board > .op-pg + .op-pg { margin-top: 48px; }
@media (min-width: 900px) {
  .op-board { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(176px, .56fr) minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 30px; align-items: start; padding: 0 0 4px; }
  .op-board > .op-pg + .op-pg { margin-top: 0; }
  .op-email { grid-column: 1; grid-row: 1; margin-top: 34px; }
  .op-alloc { grid-column: 3; grid-row: 1; }
  .op-note { grid-column: 3; grid-row: 2; margin-left: 5%; }
  .op-dcd { grid-column: 1; grid-row: 2; }
}

.op-pg { z-index: 1; padding: 16px 18px 17px; font-size: 15px; line-height: 1.55; }
.op-pg .pg-meta { margin-bottom: 11px; }
.op-hd { line-height: 1.5; }
.op-hd b { color: var(--text-2); font-weight: 600; }
.op-pg p { margin: 0 0 6px; }
.op-when { padding: 0 2px; margin: 0 -2px; transition: background-color .5s var(--ease), box-shadow .5s var(--ease), color .5s var(--ease); }
.op-when.lit { background: var(--azure-3); box-shadow: inset 0 -2px 0 var(--brand-navy); color: var(--brand-navy); }

/* the allocation, as the Manufacturer's own sheet */
.op-rows { margin: 2px 0 9px; border-top: 1.5px solid var(--slate-12); font: 400 14.5px/1.35 var(--font-ui); }
.op-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 4px; margin: 0 -4px; border-bottom: 1px solid var(--border-row); transition: background-color .5s var(--ease), box-shadow .5s var(--ease); }
.op-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.op-row.lit.adv { background: var(--adv-bg); box-shadow: inset 0 -2px 0 var(--adv); color: var(--adv-fg); }
.op-row-h { padding: 2px 0; margin: 0; }
.op-fine { margin: 0; color: var(--text-2); font-size: 14.5px; }

/* a handle: a marked phrase that a thread can be drawn from. A button cannot break across lines, so it sits as a block of words. */
.op-h { margin: 0; padding: 0; border: 0; border-radius: var(--r-1); background: none; color: inherit; font: inherit; line-height: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { .op-h { cursor: grab; } .op-dragging, .op-dragging .op-h { cursor: grabbing; } }
.op-row-h .op-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 40px; }
.op-h mark.hl { box-shadow: inset 0 -2px 0 var(--azure-6); transition: background-size .7s var(--ease), box-shadow .25s var(--ease); }
.op-row-h .op-h mark.hl { padding: 2px 4px; }
.op-row-h .op-n { font: 700 14.5px/1.35 var(--font-ui); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .op-h:hover mark.hl { box-shadow: inset 0 -2px 0 var(--brand-azure); } }
.op-h:focus-visible { outline: 2px solid var(--brand-azure); outline-offset: 3px; }
.op-h.got-adv mark.hl { box-shadow: inset 0 -2px 0 var(--adv); }
.op-h.got-navy mark.hl { box-shadow: inset 0 -2px 0 var(--brand-navy); }
.op-h.got-adv.got-navy mark.hl { box-shadow: inset 0 -2px 0 var(--brand-navy), inset 0 -4px 0 var(--adv); }
.op-h[aria-pressed="true"] mark.hl, .op-h.op-target mark.hl { box-shadow: 0 0 0 2px var(--lit); }

/* the threads: drawn over the board, never in the way of a click */
.op-svg { position: absolute; left: 0; top: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.op-knob { fill: #ffffff; stroke: var(--slate-9); stroke-width: 1.5; transition: fill .3s var(--ease), stroke .3s var(--ease); }
.op-knob.pick { fill: var(--brand-azure); stroke: var(--brand-azure); }
.op-knob.on.adv { fill: var(--adv); stroke: var(--adv); }
.op-knob.on.navy { fill: var(--brand-navy); stroke: var(--brand-navy); }
.op-knob.on.chain { fill: var(--brand-azure); stroke: var(--brand-azure); }
.op-thread { fill: none; stroke-width: 2.2; transition: stroke-dashoffset .74s var(--ease); }
.op-thread.adv { stroke: var(--adv); }
.op-thread.navy { stroke: var(--brand-navy); }
.op-thread.pulse { animation: op-pulse .7s var(--ease); }
@keyframes op-pulse { 0% { stroke-width: 2.2; } 35% { stroke-width: 5; } 100% { stroke-width: 2.2; } }
.op-temp { fill: none; stroke: var(--brand-azure); stroke-width: 2; stroke-dasharray: 5 5; }

/* each thread names itself at its middle (stacked: in the gap the thread runs through) */
.op-name { position: absolute; left: 0; top: 0; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border: 1px solid currentColor; border-radius: var(--r-2); background: #ffffff; box-shadow: var(--shadow-2);
  font: 700 13px/1.25 var(--font-display); letter-spacing: .01em; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.86); transition: opacity .35s var(--ease), transform .45s var(--spring); }
.op-name.adv { color: var(--adv-fg); }
.op-name.navy { color: var(--brand-navy); }
.op-name.on { opacity: 1; transform: translate(-50%, -50%); }
.op-name.lane { transform: translate(0, -50%) scale(.86); }
.op-name.lane.on { transform: translate(0, -50%); }
.op-nq { flex: none; width: 9px; height: 9px; background: currentColor; }
.op-name.adv .op-nq, .op-rel.adv .op-nq { background: var(--adv); }

/* a date, a clause, a dollar: one following from the other, as the briefing draws them */
.op-dcd { position: relative; z-index: 3; margin-top: 44px; }
.op-dcd-l { margin: 0 0 12px; color: var(--brand-navy); font: 400 italic 17px/1.3 var(--font-serif); }
.op-chain { display: grid; justify-items: start; gap: 10px; margin: 0; padding: 0; list-style: none; }
.op-c { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 12px 4px 8px; border: 1px solid transparent; border-radius: var(--r-2); background: transparent;
  color: var(--brand-navy); font: 700 16px/1.25 var(--font-display); letter-spacing: -0.01em; text-align: left; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.op-c:hover { border-color: var(--azure-6); background: var(--sky-2); }
.op-c[aria-pressed="true"] { border-color: var(--brand-navy); background: var(--azure-3); }
.op-c-k { color: var(--text-3); font: 700 11px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.op-c-v { font-variant-numeric: tabular-nums; }
.op-cq { flex: none; width: 12px; height: 12px; border: 2px solid var(--brand-azure); background: #ffffff; transition: background-color .3s var(--ease); }
.op-c.on .op-cq, .op-cq.on { background: var(--brand-azure); }
.op-seg { fill: none; stroke: var(--slate-7); stroke-width: 1.5; stroke-dasharray: 2 5; transition: stroke-dashoffset .74s var(--ease); }
.op-seg.on { stroke: var(--brand-azure); stroke-width: 2.2; stroke-dasharray: none; }
@media (min-width: 900px) {
  /* joined to the email from above, so the line that names them comes after */
  .op-dcd { display: flex; flex-direction: column; margin-top: 18px; }
  .op-dcd-l { order: 2; margin: 16px 0 0; }
  .op-chain { gap: 14px; }
  .op-chain li:nth-child(1) { margin-left: 30%; }
  .op-chain li:nth-child(2) { margin-left: 8%; }
  .op-chain li:nth-child(3) { margin-left: 38%; }
}

/* the foot: what the connection says, and how many there are */
.op-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; }
.op-say { grid-column: 1 / -1; }
.op-say:empty { display: none; }
.op-rel { display: inline-flex; align-items: center; gap: 7px; margin-right: 4px; }
.op-rel.adv { color: var(--adv-fg); }
.op-rel.navy { color: var(--brand-navy); }
.op-rel .op-nq { background: var(--brand-navy); }
.op-rel .op-cq { width: 11px; height: 11px; }
.op-tally { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-2); font: 600 14.5px/1.35 var(--font-display); }
.op-pips { display: inline-flex; gap: 4px; }
.op-pip { width: 10px; height: 10px; border: 1.5px solid var(--slate-9); background: #ffffff; }
.op-pip.on.adv { border-color: var(--adv); background: var(--adv); }
.op-pip.on.navy { border-color: var(--brand-navy); background: var(--brand-navy); }
.op-holds { margin: 0; color: var(--brand-navy); font: 700 15.5px/1.35 var(--font-display); text-align: right; }
.op-holds b { font-size: 1.3em; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.op-holds.in { animation: op-arrive .6s var(--ease) both; }
@keyframes op-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  .op-foot { grid-template-columns: 1fr; }
  .op-holds { text-align: left; }
}

/* ======================================================================================
   mind: what one mind holds
   ====================================================================================== */
.op-mind { display: flex; flex-direction: column; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
/* the caption keeps below the header while the field is in view. As the field leaves, it comes to rest 76px above the
   field's foot, clear of the control that rests there (the button's 40px and a gap). */
.op-cap { position: sticky; top: 88px; z-index: 2; align-self: flex-start; max-width: min(30em, calc(100% - 2 * var(--gut))); margin: 0 0 76px max(var(--gut), calc((100% - var(--wrap)) / 2)); padding: 12px 16px 13px;
  border-left: 3px solid var(--brand-azure); background: rgb(255 255 255 / .9); box-shadow: 0 0 28px 14px rgb(255 255 255 / .82); pointer-events: none; }
.op-cap-l { margin: 0; color: var(--azure-11); font: 700 12px/1.3 var(--font-display); letter-spacing: .09em; text-transform: uppercase; }
.op-cap-n { margin: 5px 0 0; color: var(--text-2); font: 600 15.5px/1.2 var(--font-display); }
.op-cap-n b { color: var(--brand-navy); font: 800 clamp(28px, 3.1vw, 42px)/1 var(--font-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.op-cap.all .op-cap-l { color: var(--brand-navy); font: 700 clamp(17px, 1.6vw, 21px)/1.3 var(--font-display); letter-spacing: -0.01em; text-transform: none; }

/* the edge of the light: what is counted lies inside it */
.op-ring { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: opacity .5s var(--ease); }
.op-ring-c { fill: none; stroke: var(--brand-azure); stroke-width: 1.5; stroke-dasharray: 3 6; opacity: .6; }
.op-flood .op-ring { opacity: 0; }

.op-rem { position: absolute; left: 50%; top: 50%; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; transform: translate(-50%, 0);
  background: rgb(255 255 255 / .92); box-shadow: 0 0 18px 8px rgb(255 255 255 / .8); color: var(--brand-navy); font: 700 14px/1.3 var(--font-display); letter-spacing: .01em; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .6s var(--ease), left .6s var(--ease), top .6s var(--ease); }
.op-rem.in { opacity: 1; }
.op-remq { flex: none; width: 10px; height: 10px; background: var(--brand-azure); }

/* the one control: at the foot of the field, and kept in view while the field is */
.op-act { position: sticky; bottom: clamp(18px, 4vh, 36px); z-index: 2; align-self: center; margin-top: auto; padding-top: 24px; }
.op-act .btn { box-shadow: 0 0 24px 12px rgb(255 255 255 / .8); }
.op-act .btn[aria-pressed="true"] { border-color: var(--brand-navy); background: var(--brand-navy); color: #ffffff; }

/* no field to draw on: the words say it all */
.op-mind.op-flat { min-height: 0; }
.op-mind.op-flat > .fig-fb { display: block; max-width: 40em; margin: 0 auto; padding: 18px var(--gut) 0; }
.op-mind.op-flat .op-cap { position: static; margin-bottom: 0; }
.op-mind.op-flat .op-act, .op-mind.op-flat .op-rem, .op-mind.op-flat .op-ring { display: none; }

@media (max-width: 640px) {
  .op-pg .pg-meta { font-size: 14px; }
  .op-pg .pg-ref { font-size: 12.5px; }
  .op-name { font-size: 14px; }
  .op-c { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; }
  .op-c .op-cq { grid-row: 1 / span 2; }
  .op-c-k { font-size: 12px; }
  .op-cap { top: 80px; padding: 10px 12px 11px; }
  .op-rem { justify-content: center; width: max-content; max-width: calc(100vw - 32px); white-space: normal; text-align: center; }
}
