/* HOW THE WHOLE THING WORKS (second version, 2026-11-06). One chart you explore, with its panel beside it on a computer and
   below it on a phone. Loaded after garden.css and shed.css; everything here sits under .whole so it never leans on the
   shed's own class names. One light colour scheme on purpose, the garden's own. Phone first. */
.whole { --wood: #8a6a4a; --wood2: #5f4630; --plum2: #5a3a5e; --wine: #7a1f4d; overflow-x: hidden; }
.whole.shed { max-width: 1240px; }
.whole, .whole p, .whole li, .whole label, .whole button, .whole td, .whole th { font-size: 18px; }
.whole .top h1 { font-size: clamp(38px, 10vw, 48px); line-height: 1.05; }
.whole .lede { max-width: 34em; margin: 12px auto 0; text-align: center; }
.whole a { color: var(--fox); }
.whole .back { display: inline-flex; align-items: center; min-height: 44px; }

/* now, soon, later */
.whole .when { position: sticky; top: 0; z-index: 30; margin: 18px -18px 0; padding: 8px 18px; background: #f6ead9f2; border-bottom: 2px solid #e5d8bf; }
.whole .whenbtns { display: flex; gap: 8px; justify-content: center; max-width: 640px; margin: 0 auto; }
.whole .whenbtn { flex: 1 1 0; min-width: 0; min-height: 48px; margin: 0; padding: 6px 8px; border: 3px solid var(--moss); border-radius: 30px; background: var(--paper); color: var(--moss); font: 700 21px/1 'Crimson Pro', Georgia, serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.whole .whenbtn:hover, .whole .whenbtn:focus-visible { border-color: var(--fox); color: var(--fox); outline: none; }
.whole .whenbtn[aria-pressed="true"] { background: var(--moss); border-color: var(--moss); color: #fffdf4; }
.whole .whenline { max-width: 44em; margin: 10px auto 0; text-align: center; font: italic 18px/1.4 Lora, Georgia, serif; color: var(--plum); min-height: 2.8em; }

/* the board: chart and panel */
.whole .board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 12px 0 0; }
.whole .chartside { min-width: 0; padding: 14px 10px 12px; background: var(--paper); border: 2px solid var(--wood2); border-radius: 10px;
  background-image: radial-gradient(#e9dcc3 1px, transparent 1.4px); background-size: 22px 22px; }
.whole .chart { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 56px 12px; padding: 14px 0 6px;
  grid-template-areas:
    ".      .      trust  trust  .      .     "
    "boards boards coop   coop   ledger ledger"
    "aid    aid    pool   pool   run    run   "
    "comm   subs   beds   seed   biz    sat   "
    "shared shared shared shared shared shared"
    "gate   gate   .      .      out    out   "; }
.whole .wires { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }

/* the parts */
.whole .node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-sizing: border-box; width: 100%; min-width: 0; min-height: 64px; margin: 0; padding: 8px 8px; border: 2px solid var(--moss); border-radius: 12px; background: var(--paper); color: var(--plum); text-align: center; font: inherit; cursor: pointer; box-shadow: 0 3px 0 #2c123026; transition: opacity .35s ease, border-color .35s ease, background-color .35s ease, box-shadow .2s ease; overflow-wrap: break-word; }
.whole .node .nm { font: 700 19px/1.15 'Crimson Pro', Georgia, serif; }
.whole .node .fig, .whole .node .tag, .whole .chip .tag { font: italic 18px/1.25 Lora, Georgia, serif; color: var(--moss); }
.whole .node .tag, .whole .chip .tag { color: #7a5c1f; }
.whole .node [hidden], .whole .chip [hidden] { display: none; }
.whole .k-trust, .whole .k-coop, .whole .k-pool, .whole .k-say, .whole .k-link, .whole .k-aid, .whole .k-run, .whole .k-door { justify-self: center; width: min(100%, 240px); }
.whole .k-trust { border-color: var(--plum); background: #f6ecf2; }
.whole .k-coop { width: min(100%, 300px); border: 3px solid var(--fox); background: #fff4f8; }
.whole .k-coop .nm { font-size: 27px; color: var(--fox); }
.whole .k-pool { width: min(100%, 300px); min-height: 84px; border: 3px solid var(--gold); background: #fff3d6; }
.whole .k-pool .nm { font-size: 24px; }
.whole .k-pool .fig { color: #6d521a; font-style: normal; font-weight: 700; }
.whole .k-aid { border-color: var(--wine); background: #fbeef4; }
.whole .k-run { border-color: var(--wood); background: #f8efdf; }
.whole .k-say { border-color: var(--plum2); }
.whole .k-link { border-color: var(--wood); }
.whole .k-people { border-color: var(--sage); }
.whole .k-door { border: 2px solid var(--wood2); background: #f3e8d4; }
.whole .node.faint, .whole .chip.faint { background: #fffaf099; border-style: dashed; border-color: #a8977a; box-shadow: none; color: #5d4a5f; }
.whole .node.build, .whole .chip.build { border-style: dashed; }
.whole .node.mine, .whole .chip.mine { border-color: var(--fox); box-shadow: 0 0 0 3px #b63f7a40, 0 3px 0 #2c123026; }
.whole .node.home { border-width: 3px; }
.whole .node[aria-pressed="true"], .whole .chip[aria-pressed="true"], .whole .sharedhead[aria-pressed="true"], .whole .node.lit, .whole .chip.lit { box-shadow: 0 0 0 4px var(--gold), 0 3px 0 #2c123026; }
.whole .node:hover, .whole .chip:hover { border-color: var(--fox); }
.whole .node:focus-visible, .whole .chip:focus-visible, .whole .sharedhead:focus-visible, .whole .token.you:focus-visible { outline: 3px solid var(--fox); outline-offset: 3px; }
.whole .node.dim, .whole .chip.dim, .whole .shared.dim { opacity: .3; }

.whole .shared { position: relative; z-index: 1; min-width: 0; padding: 6px 8px 10px; border: 2px solid var(--gold); border-radius: 12px; background: #fff9ec; transition: opacity .35s ease; }
.whole .sharedhead { display: block; width: 100%; min-height: 44px; margin: 0 0 6px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: #6d521a; font: inherit; cursor: pointer; text-align: center; }
.whole .sharedhead .nm { font: 700 22px/1.2 'Crimson Pro', Georgia, serif; }
.whole .sharedhead .fig, .whole .sharedhead .tag { display: none; }
.whole .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.whole .chip { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1 1 150px; max-width: 240px; min-height: 48px; margin: 0; padding: 6px 12px; border: 2px solid var(--gold); border-radius: 24px; background: var(--paper); color: var(--plum); font: inherit; text-align: center; cursor: pointer; transition: opacity .35s ease, border-color .35s ease; }
.whole .chip .nm { font: 700 18px/1.15 'Crimson Pro', Georgia, serif; }
.whole .chip .fig { display: none; }

/* the lines */
.whole .w { fill: none; stroke-width: 2.5; stroke-linecap: round; opacity: .85; transition: opacity .35s ease, stroke-width .35s ease; }
.whole .w.k-hold { stroke-dasharray: 10 6; stroke-width: 3; }
.whole .w.k-say { stroke-dasharray: 2 6; stroke-width: 3; }
.whole .w.k-link { stroke-width: 3; }
.whole .w.k-fund { stroke-dasharray: 1 8; stroke-width: 5; }
.whole .w.k-sat { stroke-dasharray: 1 7; stroke-width: 4; }
.whole .w.k-draw { stroke-dasharray: 7 6; }
.whole .w.faint { opacity: .3; stroke-dasharray: 4 8; }
.whole .w.hot, .whole .w.lit { opacity: 1; }
.whole .w.mine { stroke: var(--fox); opacity: 1; }
.whole .w.off { stroke: #a8977a; stroke-dasharray: 2 10; opacity: .7; }
.whole .w.dim, .whole .dots.dim { opacity: .12; }
.whole .dots circle { stroke: #fffaf0; stroke-width: 1.5; }

/* you, and a business coming in */
.whole .token { position: absolute; z-index: 3; display: inline-flex; align-items: center; box-sizing: border-box; min-height: 44px; margin: 0; padding: 4px 14px; border-radius: 22px; font: 700 18px/1.1 'Crimson Pro', Georgia, serif; white-space: nowrap; transition: left .8s cubic-bezier(.6, 0, .2, 1), top .8s cubic-bezier(.6, 0, .2, 1); }
.whole .token[hidden] { display: none; }
.whole .token.you { border: 3px solid var(--wine); background: var(--fox); color: #fffdf4; box-shadow: 0 3px 0 var(--wine); cursor: pointer; }
.whole .token.biz { border: 3px solid #7a5c1f; background: var(--gold); color: var(--plum); pointer-events: none; }

.whole .legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 4px 0; padding: 10px 0 0; border-top: 1px solid #e5d8bf; list-style: none; }
.whole .legend li { display: flex; align-items: center; gap: 8px; font: italic 18px/1.3 Lora, Georgia, serif; color: var(--plum); }
.whole .legend .sw { flex: none; width: 44px; height: 14px; overflow: visible; }
.whole .legend .w { opacity: 1; }
.whole .legend .w.faint { opacity: .5; }

/* the panel */
.whole .panel { min-width: 0; padding: 12px 16px 18px; background: var(--paper); border: 2px solid var(--moss); border-radius: 10px; scroll-margin-top: calc(var(--whenH, 70px) + 8px); }
.whole .panel h2 { margin: 6px 0 6px; font-size: 28px; line-height: 1.15; color: var(--fox); }
.whole .panel h3 { margin: 20px 0 6px; font-size: 23px; line-height: 1.2; color: var(--plum); }
.whole .panel h4 { margin: 14px 0 4px; font: 700 20px/1.25 'Crimson Pro', Georgia, serif; color: var(--plum); }
.whole .panel p { margin: 8px 0 0; }
.whole .panel ul { margin: 6px 0 0; padding-left: 22px; }
.whole .panel li { margin: 4px 0; }
.whole .crumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.whole .crumbs:empty { display: none; }
.whole .nodehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.whole .state { display: inline-block; padding: 1px 10px; border: 2px solid var(--sage); border-radius: 14px; font: italic 18px/1.4 Lora, Georgia, serif; color: var(--moss); }
.whole .state.s-faint, .whole .state.s-build { border-style: dashed; border-color: var(--gold); color: #7a5c1f; }
.whole .lead { font-weight: 700; color: var(--plum); }
.whole .stagelist li { margin: 6px 0; }
.whole .choices { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.whole .real { margin: 22px 0 0; padding: 4px 14px 12px; border-left: 6px solid var(--sage); border-radius: 0 8px 8px 0; background: #f1f0e2; }
.whole .real h3 { margin-top: 10px; }

.whole .btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 48px; max-width: 100%; padding: 8px 20px; border: 3px solid var(--moss); border-radius: 30px; background: var(--sage); color: #fffdf4; font: 700 19px/1.2 'Crimson Pro', Georgia, serif; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--moss); }
.whole .btn:hover, .whole .btn:focus-visible { background: var(--fox); border-color: var(--wine); box-shadow: 0 4px 0 var(--wine); color: #fffdf4; outline: none; }
.whole .btn.quiet2 { background: var(--paper); color: var(--moss); }
.whole .btn.quiet2:hover, .whole .btn.quiet2:focus-visible { background: var(--fox); color: #fffdf4; }
.whole .btn.small { min-height: 44px; padding: 4px 14px; font-size: 18px; box-shadow: 0 3px 0 var(--moss); }
.whole .btn.choice { min-height: 46px; padding: 6px 16px; box-shadow: 0 3px 0 var(--moss); }
.whole .doorline, .whole .walkbtns { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 16px 0 0; }
.whole .soon { margin: 12px 0 0; padding: 4px 12px 12px; border: 2px dashed var(--gold); border-radius: 6px; background: #fff6e2; }
.whole .says { font-style: italic; color: var(--moss); }

/* levers */
.whole fieldset { min-width: 0; margin: 14px 0 0; padding: 8px 12px 12px; border: 2px solid var(--moss); border-radius: 8px; background: #fffdf6; }
.whole legend { padding: 0 6px; font: 700 21px/1.2 'Crimson Pro', Georgia, serif; color: var(--fox); }
.whole .lever { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; margin: 10px 0 0; }
.whole .lever label { min-width: 0; }
.whole .lever output { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fox); text-align: right; }
.whole .lever input[type=range] { grid-column: 1 / -1; width: 100%; height: 44px; margin: 0; accent-color: var(--fox); cursor: pointer; }
.whole .example { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1.5px solid var(--gold); border-radius: 10px; font: italic 18px/1.3 Lora, Georgia, serif; color: #7a5c1f; white-space: nowrap; }

/* the bars and sums, from the first version */
.whole .flow { margin: 14px 0 0; }
.whole .stage { margin: 14px 0 0; }
.whole .stage h4 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin: 0 0 6px; font: 700 20px/1.25 'Crimson Pro', Georgia, serif; }
.whole .stage h4 b { color: var(--fox); font-variant-numeric: tabular-nums; }
.whole .track { display: flex; width: 100%; height: 30px; overflow: hidden; background: #efe3cc; border: 2px solid var(--wood2); border-radius: 4px; }
.whole .track i { display: block; height: 100%; min-width: 0; transition: width .35s ease; }
.whole .track i + i { box-shadow: inset 2px 0 0 #fffaf0; }
.whole .key { margin: 8px 0 0; padding: 0 !important; list-style: none; font-variant-numeric: tabular-nums; }
.whole .key li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; margin: 3px 0; }
.whole .key li > i { width: 16px; height: 16px; border: 1.5px solid var(--wood2); border-radius: 2px; transform: translateY(2px); }
.whole .key li > b { white-space: nowrap; }
.whole .key li.mine { color: var(--fox); font-weight: 700; }
.whole .say2 b { color: var(--fox); }
.whole .yours2 { margin: 18px 0 0; padding: 4px 14px 14px; border: 2px dashed var(--fox); border-radius: 8px; background: #fff9fb; }
.whole table.sum2 { width: 100%; margin: 6px 0 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.whole table.sum2 td, .whole table.sum2 th { padding: 5px 0; border-top: 1px solid #e5d8bf; vertical-align: top; text-align: left; }
.whole table.sum2 td:last-child { padding-left: 10px; text-align: right; font-weight: 700; white-space: nowrap; }
.whole table.sum2.ba td:nth-child(2), .whole table.sum2.ba th:nth-child(2) { padding-left: 10px; text-align: right; white-space: nowrap; color: #6b5a6e; }
.whole table.sum2.ba th { font: italic 18px Lora, Georgia, serif; color: var(--moss); text-align: right; padding-left: 10px; }
.whole table.sum2 tr.total td { border-top: 2px solid var(--plum); }
.whole .fine { margin: 12px 0 0; font: italic 18px/1.4 Lora, Georgia, serif; color: var(--moss); }
.whole .four { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 14px 0 0; }
.whole .four section { min-width: 0; padding: 2px 12px 8px; border-radius: 6px; background: #f8efdf; border-left: 6px solid var(--sage); }

/* leaving and coming in */
.whole .who2 { margin: 6px 0 0; font-style: italic; color: var(--moss); }
.whole .stepno { margin: 10px 0 0; font: italic 18px Lora, Georgia, serif; color: var(--moss); }
.whole .walk h2 { margin-top: 2px; }
.whole .home { margin: 12px 0 0; padding: 10px 14px 12px; border: 3px solid var(--fox); border-radius: 8px; background: #fff6fa; }
.whole .home h4 { margin: 0 0 4px; font-size: 22px; color: var(--fox); }

.whole .foot2 { margin: 44px 0 0; padding: 14px 0 0; border-top: 2px solid var(--gold); text-align: center; }
.whole .foot2 p { margin: 8px 0; font: italic 18px/1.45 Lora, Georgia, serif; color: var(--moss); }

/* a phone: two columns, taller */
@media (max-width: 639px) {
  .whole .chart { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 12px;
    grid-template-areas: "trust trust" "coop coop" "boards ledger" "pool pool" "aid run" "comm subs" "beds seed" "biz sat" "shared shared" "gate out"; }
  .whole .k-say, .whole .k-link, .whole .k-aid, .whole .k-run, .whole .k-door { width: 100%; }
  .whole .chip { flex: 1 1 130px; }
  .whole .chartside { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 380px) {
  .whole.shed { padding-left: 12px; padding-right: 12px; }
  .whole .when { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .whole .panel { padding-left: 12px; padding-right: 12px; }
}
/* a computer: the panel beside the chart */
@media (min-width: 1100px) {
  .whole .board { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .whole .panel { position: sticky; top: calc(var(--whenH, 70px) + 10px); max-height: calc(100vh - var(--whenH, 70px) - 24px); overflow: auto; }
  .whole .phoneonly { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .whole .node, .whole .chip, .whole .shared, .whole .w, .whole .track i, .whole .token { transition: none; }
}
.whole .w.off.dim { opacity: .7; }
