/* Tight Ship site: the drawn card pictures and the drawn Manager Handoff (sitegen/cards.py).
   Ported from the motion probe's variant B. Only transform and opacity ever animate.
   A drawing ([data-viz]) plays once when cards.js gives it "go". Start states sit behind "motion"
   on <html> (assets/js/motion.js), so with scripts off, or with reduced motion asked for, every
   drawing shows finished.
   Settings this file adds to the tokens: the chart colors below, taken from the workbooks' own fills. */
:root {
  --v-navy: #14263f;
  --v-red: #c62828;
  --v-chart-green: #3a9460;
  --v-yellow: #f0c64a;
  --v-amber: #e8a23a;
  --v-edge: rgba(12, 22, 37, .28);
}

/* ---------- the card picture: a 5 by 4 SVG ---------- */
.viz { display: block; width: 100%; height: auto; }
.viz text { font-family: var(--text); fill: var(--ink); }
.v-ground { fill: var(--bone); }
.v-panel { fill: #fff; stroke: rgba(12, 22, 37, .1); }
/* the file's tabs on the sheet's top edge: the drawn one in front, white and bold */
.v-tab { fill: #e2d9c4; stroke: rgba(12, 22, 37, .1); }
.v-tab.on { fill: #fff; }
.viz .v-tabt { font-size: 14px; font-weight: 500; fill: var(--steel); }
.viz .v-tabt.on { font-weight: 700; fill: var(--ink); }
.v-tag { fill: var(--paper); stroke: var(--v-edge); }
.viz .v-tagt { font-size: 14px; font-weight: 600; fill: var(--steel); }
.v-title { font-size: 19px; font-weight: 700; }
.v-lab { font-size: 15px; font-weight: 500; }
.v-small { font-size: 14px; font-weight: 500; }
.viz .v-sub { font-size: 15px; font-weight: 500; fill: var(--steel); }
.viz .v-b { font-weight: 700; }
.v-mid { text-anchor: middle; }
.v-end { text-anchor: end; }
.viz .v-key { font-size: 14px; font-weight: 700; letter-spacing: .06em; fill: var(--steel); }
.v-val { font-size: 17px; font-weight: 500; }
.v-num { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.v-bar, .v-rule { fill: var(--orange); }
.v-band { fill: #e6edf7; }
.v-line, .v-axis { stroke: rgba(12, 22, 37, .16); fill: none; }
.v-axis { stroke: rgba(12, 22, 37, .4); }
.v-box { fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.v-x { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.v-under { fill: rgba(12, 22, 37, .4); }
/* tones: a column, a count's edge, a count's number */
.v-fill.t-navy { fill: var(--v-navy); }
.v-fill.t-red { fill: var(--v-red); }
.v-fill.t-orange { fill: var(--orange); }
.v-fill.t-green { fill: var(--v-chart-green); }
.v-fill.t-yellow { fill: var(--v-yellow); }
.v-fill.t-amber { fill: var(--v-amber); }
.viz .v-num.t-navy { fill: var(--v-navy); }
.viz .v-num.t-red { fill: var(--v-red); }
.viz .v-num.t-orange { fill: var(--orange-text); }
/* status pills, in the workbooks' own colors */
.v-pill.s-done { fill: #dff0e3; }
.v-pill.s-over { fill: #fde2e1; }
.v-pill.s-open { fill: #fff; stroke: var(--v-edge); }
.viz .v-pillt { font-size: 14px; font-weight: 700; }
.viz .v-pillt.s-done { fill: #226639; }
.viz .v-pillt.s-over { fill: #a61b1b; }
.viz .v-pillt.s-open { fill: var(--steel); }

/* ---------- the Manager Handoff, drawn in the page with no frame ---------- */
.hand { text-align: left; }
.hand-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hand-k { color: var(--orange-text); font: 700 15px/1.35 var(--text); letter-spacing: .05em; }
.hand-tag {
  flex: none; padding: 2px 12px; border: 1px solid var(--v-edge); border-radius: 999px;
  color: var(--steel); font: 600 15px/1.5 var(--text); white-space: nowrap; background: var(--paper);
}
.hand-name { margin-top: 12px; font: 400 clamp(30px, 6vw, 44px)/1.1 var(--serif); letter-spacing: -.01em; }
.hand-sub { margin-top: 6px; color: var(--steel); font-size: 17px; line-height: 1.4; }
.hand-cols { display: grid; gap: 0 48px; }
.hand-h {
  margin-top: 26px; padding-bottom: 6px; border-bottom: 2px solid var(--orange);
  color: var(--orange-text); font: 700 15px/1.3 var(--text); letter-spacing: .05em;
}
.hand-kv { margin: 0; }
.hand-kv div, .hand-met li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 46px; padding: 8px 0; border-bottom: 1px solid var(--line);
  font-size: 17px; line-height: 1.3;
}
.hand-kv dt, .hand-met li > span:first-child { color: var(--steel); font-weight: 600; }
.hand-kv dd { margin: 0; font-weight: 600; text-align: right; }
.hand-pill {
  display: inline-block; padding: 2px 14px; border-radius: 999px;
  background: #dff0e3; color: #226639; font: 700 16px/1.5 var(--text); white-space: nowrap;
}
.hand-q { margin-top: 14px; font: 600 19px/1.35 var(--text); }
/* the choices are printed tick boxes, as on the real page: a square and a word, nothing that looks like a button */
.hand-choices { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 12px; }
.hand-choice { display: inline-flex; align-items: center; gap: 8px; font: 700 18px/1.3 var(--text); white-space: nowrap; }
.hand-choice i { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--ink); }
/* a phone keeps the three on one line, so Pass never sits alone */
@media (max-width: 639.98px) {
  .hand-choices { gap: 8px 18px; }
  .hand-choice { gap: 7px; font-size: 17px; }
}
/* the phone keeps to the gate checks and the decision; the application facts join from 640 px up */
.hand-app { display: none; }
@media (min-width: 640px) {
  .hand-app { display: block; }
  .hand-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hand-h { margin-top: 32px; }
  .hand-dec { display: grid; grid-template-columns: 1fr; }
}

/* ---------- what moves, and how ---------- */
.viz .v-r, .viz .v-p, .viz .v-grow, .viz .v-up { transform-box: fill-box; }
.v-p { transform-origin: 50% 50%; }
.v-grow { transform-origin: 0 50%; }
.v-up { transform-origin: 50% 100%; }

.motion [data-viz]:not(.go) .v-r { opacity: 0; transform: translateY(14px); }
.motion [data-viz]:not(.go) .v-p { opacity: 0; transform: scale(.82); }
.motion [data-viz]:not(.go) .v-f { opacity: 0; }
.motion [data-viz]:not(.go) .v-grow { transform: scaleX(0); }
.motion [data-viz]:not(.go) .v-up { transform: scaleY(0); }
/* --vd is the piece's place in the order (data-i) */
.motion [data-viz].go .v-r { transition: opacity .5s var(--out) var(--vd, .12s), transform .5s var(--out) var(--vd, .12s); }
.motion [data-viz].go .v-p { transition: opacity .4s var(--out) var(--vd, .12s), transform .4s var(--out) var(--vd, .12s); }
.motion [data-viz].go .v-f { transition: opacity .4s var(--out) var(--vd, .12s); }
.motion [data-viz].go .v-grow, .motion [data-viz].go .v-up { transition: transform .6s var(--out) var(--vd, .12s); }
[data-viz].is-set * { transition: none !important; }
[data-viz] [data-i="0"] { --vd: .12s; } [data-viz] [data-i="1"] { --vd: .19s; } [data-viz] [data-i="2"] { --vd: .26s; }
[data-viz] [data-i="3"] { --vd: .33s; } [data-viz] [data-i="4"] { --vd: .40s; } [data-viz] [data-i="5"] { --vd: .47s; }
[data-viz] [data-i="6"] { --vd: .54s; } [data-viz] [data-i="7"] { --vd: .61s; } [data-viz] [data-i="8"] { --vd: .68s; }
[data-viz] [data-i="9"] { --vd: .75s; } [data-viz] [data-i="10"] { --vd: .82s; } [data-viz] [data-i="11"] { --vd: .89s; }
[data-viz] [data-i="12"] { --vd: .96s; } [data-viz] [data-i="13"] { --vd: 1.03s; } [data-viz] [data-i="14"] { --vd: 1.10s; }

/* Reduced motion means no movement (motion.js leaves "motion" off; this is the belt to that braces).
   Nothing inside a drawing is placed with a transform attribute, so all of it can be reset. */
@media (prefers-reduced-motion: reduce) {
  [data-viz] * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
@media print {
  [data-viz] * { opacity: 1 !important; transform: none !important; }
}
