/* ════════════════════════════════════════════════════════════════
   Inner Work, Patterns (20-perspective.js). The reading goes one part at a time in a view that does not scroll.
   The soft bubble waits and thinks while a reading loads or is being written.
   ════════════════════════════════════════════════════════════════ */
@property --bc { syntax: '<color>'; inherits: true; initial-value: gray; }
#iw-patterns .bw { --bs: clamp(160px, 17vw, 240px); --bv: oklch(from var(--bc) calc(l + .04) calc(c * 2.4) h); display: flex; flex-direction: column; gap: 14px; max-width: none; min-height: 0; overflow: hidden; transition: --bc .9s ease; }
#iw-patterns .bw-top { display: flex; flex-direction: column; gap: 6px; }
#iw-patterns .bw-head { margin: 0; max-width: 72ch; font: italic 400 22px/1.4 var(--serif); color: var(--ink); }
#iw-patterns .bw-meta { margin: 0; font: 400 15px/1.4 var(--serif); color: var(--muted); }
#iw-patterns .pm-refreshbar { margin-top: 6px; }
#iw-patterns .pm-asof { font: italic 400 14.5px var(--serif); color: var(--muted); }
#iw-patterns .bw-t { margin: 0 0 18px; font: 500 clamp(28px, 2.6vw, 36px)/1.15 var(--serif); letter-spacing: -.015em; color: var(--ink); }
#iw-patterns .bw-cta { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--border); background: transparent; color: var(--ink); font: 500 13px var(--sans); cursor: pointer; }
#iw-patterns .bw-cta:hover { border-color: var(--bc); }
#iw-patterns .bw-brief { margin: 0; max-width: 70ch; font: 400 20px/1.65 var(--serif); color: var(--ink); }
#iw-patterns .bw-qq { margin: 0; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--bc) 55%, var(--border)); font: italic 400 19px/1.45 var(--serif); color: var(--ink); }
#iw-patterns .bw-sub { margin: 0 0 12px; max-width: 60ch; font: 400 16.5px/1.5 var(--serif); color: var(--ink-soft); }
/* the bubble: a soft glowing sphere in the stop's color, with a calm face */
#iw-patterns .bw-bubble { position: relative; width: var(--bs); height: var(--bs); flex: 0 0 auto; }
#iw-patterns .bw-glow { position: absolute; inset: -16%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--bv) 45%, transparent) 35%, transparent 70%); filter: blur(18px); }
#iw-patterns .bw-orb { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--bv) 22%, white) 0%, color-mix(in srgb, var(--bv) 78%, white) 30%, var(--bv) 62%, color-mix(in srgb, var(--bv) 84%, black) 100%);
  -webkit-mask: radial-gradient(circle, black 64%, transparent 71%); mask: radial-gradient(circle, black 64%, transparent 71%); filter: blur(.6px); }
#iw-patterns .bw-face { position: absolute; inset: 14%; width: 72%; height: 72%; overflow: visible; }
#iw-patterns .bw-face * { transform-box: fill-box; transform-origin: center; transition: transform .5s cubic-bezier(.16,1,.3,1); }
#iw-patterns .bw-eyes ellipse { fill: color-mix(in srgb, var(--bc) 22%, var(--ink)); }
#iw-patterns .bw-glint { fill: color-mix(in srgb, white 85%, var(--bc)); }
#iw-patterns .bw-brow, #iw-patterns .bw-mouth { fill: none; stroke: color-mix(in srgb, var(--bc) 22%, var(--ink)); stroke-width: 3.2; stroke-linecap: round; }
#iw-patterns .bw-eyes { animation: bwBlink 7s ease-in-out infinite; }
@keyframes bwBlink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.12); } }
/* thinking: the eyes go up and to the side, one brow lifts, the mouth draws in, question marks rise and fade */
#iw-patterns .bw-bubble.think .bw-eyes { animation: none; transform: translate(9%, -16%); }
#iw-patterns .bw-bubble.think .bw-brow.r { transform: translateY(-38%) rotate(-6deg); }
#iw-patterns .bw-bubble.think .bw-brow.l { transform: translateY(8%) rotate(4deg); }
#iw-patterns .bw-bubble.think .bw-mouth { transform: translateX(12%) scaleX(.55) rotate(-8deg); }
#iw-patterns .bw-q { position: absolute; color: color-mix(in srgb, var(--bc) 70%, var(--ink)); opacity: 0; pointer-events: none; }
#iw-patterns .bw-q.q1 { top: -4%; left: 58%; font-size: 26px; }
#iw-patterns .bw-q.q2 { top: 6%; left: 82%; font-size: 18px; }
#iw-patterns .bw-q.q3 { top: -12%; left: 34%; font-size: 15px; }
#iw-patterns .bw-bubble.think .bw-q { animation: bwQ 1.4s ease-out both; }
#iw-patterns .bw-bubble.think .bw-q.q2 { animation-delay: .18s; }
#iw-patterns .bw-bubble.think .bw-q.q3 { animation-delay: .34s; }
#iw-patterns .bw-bubble.think.loop .bw-q { animation-iteration-count: infinite; animation-duration: 2.2s; }
@keyframes bwQ { 0% { opacity: 0; transform: translateY(6px) rotate(-8deg) scale(.7); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px) rotate(10deg) scale(1); } }
/* while the reading is being written: the bubble alone, thinking */
#iw-patterns .bw-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; min-height: 420px; --bs: 200px; }
#iw-patterns .bw-waitp { margin: 0; font: italic 400 18px var(--serif); color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  #iw-patterns .bw, #iw-patterns .bw-face * { transition: none; }
  #iw-patterns .bw-eyes, #iw-patterns .bw-bubble.think .bw-q { animation: none; }
}

/* Reflect Again is a button, not a line of link text */
#iw-patterns .pm-refreshbar .pm-refresh { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border: 1px solid var(--border); background: transparent; color: var(--ink); font: 500 12.5px var(--sans); text-decoration: none; cursor: pointer; }
#iw-patterns .pm-refreshbar .pm-refresh:hover { border-color: var(--bc); }
#iw-patterns .pm-refreshbar { display: flex; align-items: center; gap: 14px; }

/* while Patterns is open the page holds still */
html:has(body.iw-fixed), body.iw-fixed { overflow: hidden !important; }
body.iw-fixed .hub-main { overflow: hidden !important; }
body.iw-fixed .hub-main::after { display: none !important; }
#iw-patterns .bw-top { flex: 0 0 auto; }
#iw-patterns .bw-head { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { html:has(body.iw-fixed), body.iw-fixed, body.iw-fixed .hub-main { overflow: auto !important; } #iw-patterns .bw { height: auto !important; overflow: visible; } }
/* each quote is a card that says where it came from: the quote, what the reading noticed about it, and its source */
#iw-patterns .bw-src { position: relative; margin: 0; padding: 11px 12px 9px; display: flex; flex-direction: column; gap: 6px; background: color-mix(in srgb, var(--sc) 6%, var(--bg)); border: 1px solid color-mix(in srgb, var(--sc) 26%, var(--border)); transition: border-color .2s ease, box-shadow .25s ease; }
#iw-patterns .bw-src::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--sc); opacity: .8; }
#iw-patterns .bw-src:hover { border-color: color-mix(in srgb, var(--sc) 48%, var(--border)); box-shadow: 0 12px 26px -18px color-mix(in srgb, var(--sc) 60%, transparent); }
#iw-patterns .bw-src blockquote { margin: 0; font: italic 400 15.5px/1.4 var(--serif); color: var(--ink); quotes: '“' '”'; }
#iw-patterns .bw-src blockquote::before { content: open-quote; color: var(--sc); margin-right: 1px; }
#iw-patterns .bw-src blockquote::after { content: close-quote; color: var(--sc); }
#iw-patterns .bw-src-note { margin: 0; font: 400 14px/1.4 var(--serif); color: var(--ink-soft); }
#iw-patterns .bw-src figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; margin-top: auto; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--sc) 18%, var(--border-light)); font: italic 400 13px/1.3 var(--serif); color: var(--muted); }
#iw-patterns .bw-src figcaption > .bi { font-style: normal; font-size: 12.5px; color: var(--sc); }
#iw-patterns .bw-src figcaption > span { flex: 1 1 100px; min-width: 0; }
#iw-patterns .bw-src-open { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 8px; border: 1px solid var(--border); background: transparent; color: var(--ink); font: 500 11.5px var(--sans); font-style: normal; cursor: pointer; }
#iw-patterns .bw-src-open:hover { border-color: var(--sc); }
#iw-patterns .bw-src-open .bi { font-size: 11px; }
#section-innerwork .iw-view.active { scrollbar-width: thin; }

/* ═══ Patterns, one part at a time (2026-11-06). A line for each part across the top, Feedback the last of them. The words on
       the left, paged when they outgrow the fixed layout; on the right a timeline that fits the column, its sources floating
       beside the line as icons that open into their cards. ═══ */
#iw-patterns .bw.steps { --bc: var(--ocean); --seg: color-mix(in oklab, oklch(from var(--ocean) l calc(c * 2.6) h) 72%, var(--ink)); --fb: color-mix(in srgb, var(--red) 55%, var(--purple)); padding: 18px 22px 14px; background: var(--bg); border: 1px solid var(--border); box-sizing: border-box; }
#iw-patterns .bw.steps .bw-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 28px; }
#iw-patterns .bw.steps .bw-head, #iw-patterns .bw.steps .bw-meta { grid-column: 1; }
#iw-patterns .bw.steps .pm-refreshbar { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin: 0; }
/* the lines: faint until read, then filled; the open one strongest and its name in ink */
#iw-patterns .bw-nav { position: relative; flex: 0 0 auto; }
#iw-patterns .bw-tabs { display: flex; gap: 8px; }
#iw-patterns .bw-seg { flex: 1 1 0; min-width: 0; padding: 0 0 2px; border: 0; background: none; color: var(--muted); font: 400 16px/1.2 var(--serif); text-align: left; cursor: pointer; transition: color .2s ease; }
#iw-patterns .bw-seg::before { content: ''; display: block; height: 3px; margin-bottom: 7px; background: color-mix(in srgb, var(--ink) 11%, transparent); transition: background-color .3s ease; }
#iw-patterns .bw-seg span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#iw-patterns .bw-seg:hover, #iw-patterns .bw-seg.on { color: var(--ink); }
#iw-patterns .bw-seg.seen::before { background: color-mix(in srgb, var(--seg) 62%, transparent); }
#iw-patterns .bw-seg.on::before { background: var(--seg); }
#iw-patterns .bw-seg:focus-visible { outline: 2px solid var(--seg); outline-offset: 3px; }
/* Feedback waits at the end in its own color, and only takes it once every part has been read */
#iw-patterns .bw-seg.fb[aria-disabled="true"] { color: var(--whisper); cursor: default; }
#iw-patterns .bw-seg.fb[aria-disabled="false"]::before { background: color-mix(in srgb, var(--fb) 70%, transparent); }
#iw-patterns .bw-seg.fb.on::before { background: var(--fb); }
#iw-patterns .bw-lock { position: absolute; top: 100%; right: 0; z-index: 2; margin: 4px 0 0; padding: 2px 0 2px 12px; background: var(--bg); font: italic 400 15px var(--serif); color: var(--ink-soft); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
#iw-patterns .bw-lock.show { opacity: 1; }
/* the stage: the words and the timeline, side by side */
#iw-patterns .bw.steps .bw-stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 44px; flex: 1 1 auto; min-height: 0; padding-top: 6px; }
#iw-patterns .bw.steps .bw-stage.solo { grid-template-columns: minmax(0, 1fr); }
#iw-patterns .bw-stage > *, #iw-patterns .bw-page > * { animation: asPageIn 360ms cubic-bezier(.22, .8, .24, 1) both; }
#iw-patterns .bw-text { display: flex; flex-direction: column; min-height: 0; }
#iw-patterns .bw-page { flex: 1 1 auto; min-height: 0; overflow: hidden; }
#iw-patterns .bw-para { margin: 0; max-width: 70ch; font: 400 19px/1.62 var(--serif); color: var(--ink); }
#iw-patterns .bw-qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 44px; }
/* the numbered circles, there only when the words run to more than one page */
#iw-patterns .bw-tfoot { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; padding-top: 12px; }
#iw-patterns .bw-tfoot:not(:has(> :not([hidden]))) { display: none; }
#iw-patterns .bw-pager { display: flex; gap: 8px; }
#iw-patterns .bw-pager[hidden] { display: none; }
#iw-patterns .bw-pg { width: 28px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--muted); font: 500 12.5px/1 var(--sans); cursor: pointer; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
#iw-patterns .bw-pg:hover { border-color: var(--seg); color: var(--ink); }
#iw-patterns .bw-pg[aria-current="page"] { border-color: var(--seg); background: var(--seg); color: var(--bg); }
#iw-patterns .bw-pg:focus-visible { outline: 2px solid var(--seg); outline-offset: 2px; }
/* the timeline: the whole span in the column, nothing to scroll. The field is what the focus glides. */
#iw-patterns .bw-rail { position: relative; min-height: 0; overflow: hidden; }
#iw-patterns .bw-field { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
#iw-patterns .bw-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#iw-patterns .bw-spine { fill: none; stroke: color-mix(in srgb, var(--ink) 20%, transparent); stroke-width: 1; }
#iw-patterns .bw-ticks { fill: none; stroke: color-mix(in srgb, var(--ink) 24%, transparent); stroke-width: 1; }
#iw-patterns .bw-teth { fill: none; stroke: color-mix(in srgb, var(--sc) 50%, transparent); stroke-width: 1; }
#iw-patterns .bw-anc { fill: var(--sc); stroke: var(--bg); stroke-width: 1.5; }
#iw-patterns .bw-end { position: absolute; transform: translateX(-50%); padding: 0 6px; background: var(--bg); font: italic 400 14px/1.2 var(--serif); color: var(--muted); white-space: nowrap; }
#iw-patterns .bw-end.a { top: 3px; }
#iw-patterns .bw-end.b { bottom: 3px; }
#iw-patterns .bw-spine, #iw-patterns .bw-ticks, #iw-patterns .bw-teth, #iw-patterns .bw-anc, #iw-patterns .bw-end, #iw-patterns .bw-nd { transition: opacity .3s ease; }
/* an icon for each source, in that kind's color */
#iw-patterns .bw-nd { --nv: oklch(from var(--sc) calc(l + .02) min(calc(c * 1.7), .13) h); position: absolute; top: -18px; left: -18px; width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; outline: none; }
#iw-patterns .bw-nd-i { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: var(--nv); color: var(--bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--nv) 14%, transparent), 0 9px 18px -8px color-mix(in srgb, var(--nv) 80%, transparent); font-size: 15px; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease; animation: bwNdIn .5s calc(var(--i) * 45ms) cubic-bezier(.34, 1.56, .64, 1) backwards; }
#iw-patterns .bw-nd-i::after { content: ''; position: absolute; inset: -6px; border: 1.5px solid var(--nv); border-radius: 50%; opacity: 0; transform: scale(.5); transition: opacity .25s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bwNdIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
#iw-patterns .bw-nd.loose .bw-nd-i { border: 1px dashed var(--nv); background: color-mix(in srgb, var(--nv) 14%, var(--bg)); color: var(--nv); }
#iw-patterns .bw-nd:hover, #iw-patterns .bw-nd:focus-visible { z-index: 3; }
#iw-patterns .bw-nd:hover .bw-nd-i { transform: scale(1.12); box-shadow: 0 0 0 6px color-mix(in srgb, var(--nv) 20%, transparent), 0 9px 18px -8px color-mix(in srgb, var(--nv) 80%, transparent); }
#iw-patterns .bw-nd:focus-visible .bw-nd-i::after, #iw-patterns .bw-nd.on .bw-nd-i::after { opacity: 1; transform: scale(1); }
/* where it came from, on pointing at it */
#iw-patterns .bw-nd-tip { position: absolute; top: 50%; left: calc(100% + 9px); transform: translateY(-50%); padding: 1px 6px; background: var(--bg); font: italic 400 14.5px/1.3 var(--serif); color: var(--ink); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
#iw-patterns .bw-nd.flip .bw-nd-tip { right: calc(100% + 9px); left: auto; }
#iw-patterns .bw-nd:hover .bw-nd-tip, #iw-patterns .bw-nd:focus-visible .bw-nd-tip { opacity: 1; }
/* focus: as on the Questions map, the rest fall back while the chosen one holds the view */
#iw-patterns .bw-rail.focus .bw-nd:not(.on), #iw-patterns .bw-rail.focus .bw-teth:not(.on), #iw-patterns .bw-rail.focus .bw-anc:not(.on), #iw-patterns .bw-rail.focus .bw-ticks, #iw-patterns .bw-rail.focus .bw-end { opacity: .22; }
#iw-patterns .bw-rail.focus .bw-spine { opacity: .8; }
#iw-patterns .bw-rail.focus:not(.tight) { -webkit-mask-image: linear-gradient(to right, transparent, black 20px); mask-image: linear-gradient(to right, transparent, black 20px); }
#iw-patterns .bw-rail.focus .bw-nd-tip { display: none; }
/* its cards open out of the icon */
#iw-patterns .bw-fc { position: absolute; z-index: 4; top: 50%; left: 90px; translate: 0 -50%; display: flex; flex-direction: column; gap: 7px; width: min(330px, calc(100% - 94px)); max-height: calc(100% - 4px); box-sizing: border-box; background: var(--bg); transform-origin: 0 50%; }
#iw-patterns .bw-fc[hidden] { display: none; }
#iw-patterns .bw-fc.in { animation: bwFcIn .44s cubic-bezier(.22, 1.2, .36, 1) .22s both; }
#iw-patterns .bw-fc.out { animation: bwFcOut .2s ease both; }
@keyframes bwFcIn { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: none; } }
@keyframes bwFcOut { to { opacity: 0; transform: scale(.9); } }
#iw-patterns .bw-fc-h { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: italic 400 14.5px/1.3 var(--serif); color: var(--ink-soft); }
#iw-patterns .bw-fc-x { flex: 0 0 auto; height: 25px; padding: 0 8px; border: 1px solid var(--border); background: transparent; color: var(--ink); font: 500 11.5px var(--sans); cursor: pointer; }
#iw-patterns .bw-fc-x:hover { border-color: var(--seg); }
#iw-patterns .bw-fc-b { min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 8px; }
#iw-patterns .bw-fc-b::-webkit-scrollbar { display: none; }
/* a narrow column: the chosen icon goes to the top and its cards take the width beneath it */
#iw-patterns .bw-rail.tight .bw-fc { top: 76px; left: 0; translate: none; width: 100%; max-height: calc(100% - 78px); transform-origin: 50% 0; }
/* Feedback: the box takes the whole width and the room the stage has */
#iw-patterns .bw-fb { display: flex; flex-direction: column; min-height: 0; }
#iw-patterns .bw-fb .bw-t { margin-bottom: 6px; }
#iw-patterns .bw-fb .bw-sub { max-width: none; margin-bottom: 10px; }
#iw-patterns .bw-fb .pm-land { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; margin: 0; padding: 0; border: 0; max-width: none; }
#iw-patterns .bw-fb textarea { flex: 1 1 auto; min-height: 56px; resize: none; padding: 14px 16px; border: 1px solid var(--border); background: var(--bg); font: 400 18px/1.55 var(--serif); color: var(--ink); }
#iw-patterns .bw-fb .pm-land-f { flex-wrap: wrap; padding-right: 120px; }   /* clear of the Guide button in the corner */
#iw-patterns .bw-fb .pm-land-note { flex: 1 1 140px; font: italic 400 15px/1.4 var(--serif); color: var(--muted); }
#iw-patterns .bw-fb .pm-land-send { height: 36px; padding: 0 18px; border-radius: 0; }
/* a phone gives up the fixed layout: the page scrolls as a whole, the words above the timeline */
@media (max-width: 760px) {
  #iw-patterns .bw-tabs { overflow-x: auto; scrollbar-width: none; }
  #iw-patterns .bw-tabs::-webkit-scrollbar { display: none; }
  #iw-patterns .bw-seg { flex: 0 0 96px; }
  #iw-patterns .bw.steps .bw-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 22px; }
  #iw-patterns .bw.steps .bw-top { grid-template-columns: minmax(0, 1fr); }
  #iw-patterns .bw.steps .pm-refreshbar { grid-column: 1; grid-row: auto; }
  #iw-patterns .bw-page { overflow: visible; }
  #iw-patterns .bw-rail { height: 340px; }
  #iw-patterns .bw-qs { grid-template-columns: minmax(0, 1fr); }
  #iw-patterns .bw-fb textarea { min-height: 200px; }
  #iw-patterns .bw-fb .pm-land-f { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #iw-patterns .bw-stage > *, #iw-patterns .bw-page > * { animation: none; }
  #iw-patterns .bw-seg, #iw-patterns .bw-seg::before, #iw-patterns .bw-pg, #iw-patterns .bw-lock, #iw-patterns .bw-field, #iw-patterns .bw-nd-i, #iw-patterns .bw-nd-i::after { transition: none; }
  #iw-patterns .bw-nd-i, #iw-patterns .bw-fc.in, #iw-patterns .bw-fc.out { animation: none; }
}
