/* tiun atlas v2: value proposition canvas. Coloured sticky notes on the standard square-and-circle layout. Needs base.css. */

/* ---- the sheet: headings, the canvas, the key */
.sheet { position: relative; min-width: 1232px; max-width: 1760px; margin: 0 auto; padding-top: 20px; }
.heads { display: grid; grid-template-columns: 2.7% 44.94% 4.72% 44.94% 2.7%; }
.head { grid-row: 1; }
.head--map { grid-column: 2; }
.head--profile { grid-column: 4; display: flex; align-items: center; gap: 12px; }
.head--map { align-self: center; }
.head__title { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 640; letter-spacing: -0.02em; text-wrap: balance; }
.head__sub { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; max-width: 60ch; }

.stage { position: relative; aspect-ratio: 1780 / 888; container-type: inline-size; margin-top: 6px; }
.cv-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cv-shape { fill: var(--sheet); stroke: var(--ink); stroke-width: 3; }
.cv-div { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.cv-arrow { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cv-icon { fill: var(--sheet); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.cv-icon__ground { stroke: none; }
.cv-icon__dot { fill: var(--ink); stroke: none; }
.cv-label { font-size: 19px; font-weight: 600; fill: var(--ink); letter-spacing: 0.005em; }

.stage__notes { position: absolute; inset: 0; --u: calc(100cqw / 1780); }
.zone { display: contents; }
.zone__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }

.note {
  position: absolute; left: 0; top: 0; z-index: 1;
  width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u));
  translate: calc(var(--x) * var(--u)) calc(var(--y) * var(--u));
  rotate: var(--r, 0deg);
  display: flex; align-items: center; margin: 0;
  padding: calc(5 * var(--u)) calc(8 * var(--u));
  border: 0; border-radius: calc(3 * var(--u));
  background: var(--bg); color: var(--fg);
  font-size: max(11px, calc(var(--f) * var(--u))); font-weight: 560; line-height: 1.2; letter-spacing: -0.005em; text-align: left;
  box-shadow: 0 1px 1px rgba(20, 22, 28, 0.12), 0 calc(7 * var(--u)) calc(12 * var(--u)) calc(-5 * var(--u)) rgba(20, 22, 28, 0.32);
  cursor: pointer;
  transition: translate 560ms var(--ease), width 560ms var(--ease), height 560ms var(--ease), font-size 560ms var(--ease), rotate 180ms var(--ease), scale 180ms var(--ease), opacity 220ms var(--ease), box-shadow 180ms var(--ease);
}
.note--job { --bg: var(--job); --fg: var(--job-ink); }
.note--pain { --bg: var(--pain); --fg: var(--pain-ink); }
.note--reliever { --bg: var(--reliever); --fg: var(--reliever-ink); }
.note--gain { --bg: var(--gain); --fg: var(--gain-ink); }
.note--creator { --bg: var(--creator); --fg: var(--creator-ink); }
.note--product { --bg: var(--product); --fg: var(--product-ink); }
.note__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: break-word; }
.note__rank { position: absolute; left: calc(-7 * var(--u)); top: calc(-8 * var(--u)); min-width: 1.5em; height: 1.5em; padding: 0 0.3em; display: grid; place-items: center; border-radius: 1em; background: var(--fg); color: #fff; font-weight: 650; font-size: 0.86em; line-height: 1; font-variant-numeric: tabular-nums; }
.note__ev, .ev { width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; flex: none; }
.note__ev { position: absolute; right: calc(6 * var(--u)); bottom: calc(6 * var(--u)); opacity: 0.75; }
.note__ev--assumed, .ev--assumed { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
/* a need nothing answers: the note is only an outline, so the hole in the offer is visible */
.note.is-gap { background: color-mix(in srgb, var(--bg) 22%, #fff); box-shadow: none; outline: calc(2.2 * var(--u)) dashed var(--fg); outline-offset: calc(-2.2 * var(--u)); }
.note--pile { --bg: var(--sheet); --fg: var(--ink-2); justify-content: center; text-align: center; box-shadow: none; outline: 1.5px dashed #9aa1af; outline-offset: -1.5px; rotate: 0deg; }
.note[hidden] { display: none; }
.stage.is-instant .note { transition: none; }
.note.is-away { opacity: 0; scale: 0.7; pointer-events: none; }
.note:hover, .note:focus-visible, .note.is-selected { rotate: 0deg; scale: 1.07; z-index: 5; box-shadow: 0 2px 3px rgba(20, 22, 28, 0.14), 0 calc(16 * var(--u)) calc(26 * var(--u)) calc(-8 * var(--u)) rgba(20, 22, 28, 0.4); }
.note.is-gap:hover, .note.is-gap:focus-visible, .note.is-gap.is-selected, .note--pile:hover, .note--pile:focus-visible { box-shadow: 0 calc(10 * var(--u)) calc(20 * var(--u)) calc(-8 * var(--u)) rgba(20, 22, 28, 0.3); }
.note:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.note.is-selected { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.stage.has-focus .note:not(.is-lit):not(.is-away):not(:hover):not(:focus-visible) { opacity: 0.3; }
.stage.has-focus .note.is-lit { z-index: 4; }

.cv-links { pointer-events: none; }
.cv-link { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 420ms var(--ease) forwards; }
.cv-link__end { stroke: var(--sheet); stroke-width: 2; }
.cv-link--pain { stroke: var(--pain-line); }
.cv-link--gain { stroke: var(--gain-line); }
circle.cv-link--pain { fill: var(--pain-line); stroke: var(--sheet); }
circle.cv-link--gain { fill: var(--gain-line); stroke: var(--sheet); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.foot { display: flex; align-items: baseline; justify-content: space-between; gap: 32px; padding: 14px 2.7% 0; color: var(--ink-2); font-size: 14px; }
.foot__fit, .foot__more { margin: 0; max-width: 78ch; }
.foot__more { color: var(--ink); margin-bottom: 4px; }
.foot__more[hidden] { display: none; }
.foot__fit strong { color: var(--ink); font-weight: 620; }
.key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.key li { display: inline-flex; align-items: center; gap: 7px; }
.key .ev { width: 9px; height: 9px; color: var(--ink); }
.key__gap { width: 18px; height: 13px; border-radius: 2px; outline: 1.5px dashed var(--pain-ink); outline-offset: -1.5px; background: color-mix(in srgb, var(--pain) 22%, #fff); }
.key__rank { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 650; line-height: 1; }

/* ---- phones: the canvas becomes a list of its six parts, still as notes */
@media (max-width: 700px) {
  .sheet { min-width: 0; }
  .heads { display: block; }
  .head--map { display: none; }
  .stage { aspect-ratio: auto; container-type: normal; margin-top: 16px; }
  .cv-svg { display: none; }
  .stage__notes { position: static; }
  .zone { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
  .zone__title { position: static; width: auto; height: auto; clip-path: none; grid-column: 1 / -1; font-size: 17px; font-weight: 640; }
  .note { position: relative; width: auto; height: auto; min-height: 64px; translate: none; rotate: 0deg; padding: 10px 12px; border-radius: 4px; font-size: 15px; }
  .note.is-away { display: none; }
  .note__rank { left: -6px; top: -7px; }
  .note__ev { right: 7px; bottom: 7px; }
  .note.is-gap { outline-width: 2px; outline-offset: -2px; }
  .foot { display: block; padding: 0; }
  .key { margin-top: 12px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .note { transition-duration: 1ms; }
  .cv-link { animation: none; stroke-dashoffset: 0; }
}
