Something went wrong. Try again.
Something went wrong. Try again.
14 kB · 825 lines
CSS
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826/* ────────────────────────────────────────────────────────────── Interactive widgets. Same palette as deck.css: teal converges, amber breaks, orchid is "a message in flight". ────────────────────────────────────────────────────────────── */
.widget { width: 100%;}
.reveal .widget button { font-family: var(--font); cursor: pointer;}
/* ── Shared controls ─────────────────────────────────────── */
.w-btn { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 0.35rem 0.9rem;}
.w-btn:hover { color: var(--ink); border-color: var(--grey-light);}
.w-seg { display: inline-flex; border: 2px solid var(--rule); border-radius: 999px; padding: 3px; background: #fff;}
.w-seg button { font-size: 0.6rem; font-weight: 700; color: var(--grey); background: none; border: none; border-radius: 999px; padding: 0.35rem 1rem; transition: background 0.3s var(--ease), color 0.3s var(--ease);}
.w-seg button.on { background: var(--elixir); color: #fff;}
/* Toggle switch: the thing you hit on stage */.w-switch { display: inline-flex; align-items: center; gap: 0.6rem; background: none; border: none; padding: 0; font-size: 0.6rem; font-weight: 700; color: var(--amber);}
.w-switch .knob { position: relative; width: 3.2rem; height: 1.6rem; border-radius: 999px; background: rgba(194, 116, 10, 0.18); border: 2px solid var(--amber); transition: background 0.35s var(--ease), border-color 0.35s var(--ease);}
/* Centred against the inside of the pill (inside the border), with the same inset on every side in both positions */.w-switch .knob::after { content: ""; position: absolute; top: 50%; left: 0.25rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--amber); transform: translateY(-50%); transition: left 0.35s var(--ease), background 0.35s var(--ease);}
.w-switch.on { color: var(--teal);}
.w-switch.on .knob { background: rgba(13, 148, 136, 0.15); border-color: var(--teal);}
.w-switch.on .knob::after { left: calc(100% - 1.35rem); background: var(--teal);}
/* A ✓ or ✕ inside the knob instead of an "up/down" label */.w-switch.marks .knob::after { content: "✕"; display: flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 900; line-height: 1; color: #fff;}
.w-switch.marks.on .knob::after { content: "✓";}
.w-switch.vertical { flex-direction: column; gap: 0.4rem;}
/* ── SVG nodes, links, packets ───────────────────────────── */
.w-svg { width: 100%; height: auto; overflow: visible;}
.w-link { stroke: var(--grey-light); stroke-width: 4; transition: stroke 0.4s, opacity 0.4s;}
.w-link.down { stroke: var(--amber); stroke-dasharray: 4 10; opacity: 0.6;}
.w-link.peer { stroke: var(--elixir); stroke-dasharray: 12 9;}
.w-link.hidden,.w-linklabel.hidden { opacity: 0;}
.w-linklabel { font-size: 30px; font-weight: 700; fill: var(--elixir); transition: opacity 0.4s;}
.w-node { cursor: pointer; transition: opacity 0.4s;}
.w-node circle,.w-node rect { fill: #fff; stroke: var(--elixir); stroke-width: 4; transition: fill 0.35s var(--ease), stroke 0.35s var(--ease);}
.w-node.sup rect { fill: #f1edf5;}
.w-node:hover circle,.w-node:hover rect { stroke-width: 6;}
.w-node .w-name { font-size: 25px; font-weight: 800; fill: var(--ink); pointer-events: none;}
.w-node .w-meta { font-size: 19px; fill: var(--grey); pointer-events: none;}
.w-node .w-face { font-size: 40px; pointer-events: none;}
.w-node.down circle,.w-node.down rect { fill: #f8eee0; stroke: var(--amber); stroke-dasharray: 8 6;}
.w-node.down .w-name,.w-node.down .w-meta { fill: var(--amber);}
.w-node.user.down { opacity: 0.45;}
.w-node.server circle { fill: var(--erlang); stroke: var(--erlang);}
.w-node.server .w-name { fill: #fff;}
.w-node.server.relay circle { fill: #fff; stroke: var(--grey-light); stroke-dasharray: 10 7;}
.w-node.server.relay .w-name { fill: var(--grey);}
.w-node.server.down circle { fill: rgba(194, 116, 10, 0.1); stroke: var(--amber);}
.w-node.server.down .w-name { fill: var(--amber);}
.w-packet { fill: var(--orchid); pointer-events: none;}
.w-packet.bad { fill: var(--amber);}
.w-packet.peer { fill: var(--elixir);}
/* Something just happened here */.w-flash circle,.w-flash rect { animation: w-flash 0.7s var(--ease);}
@keyframes w-flash { 0% { stroke: var(--teal); stroke-width: 10; }}
.w-fail circle { animation: w-fail 0.7s var(--ease);}
@keyframes w-fail { 0%, 60% { stroke: var(--amber); stroke-width: 10; }}
/* Quilts: each user's copy of the shared canvas */.w-node .w-quilt .w-quilt-card { fill: #fff; stroke: var(--rule); stroke-width: 2; stroke-dasharray: none; transition: stroke 0.4s;}
.w-node .w-quilt.behind .w-quilt-card { stroke: var(--amber); stroke-width: 3; stroke-dasharray: 7 5;}
.w-node .w-quilt .w-cell { fill: var(--wash); stroke: none; stroke-dasharray: none;}
.w-node .w-tile { font-size: 36px; pointer-events: none; transform-box: fill-box; transform-origin: center;}
.w-tile.pop { animation: w-tile-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);}
@keyframes w-tile-pop { 0% { transform: scale(0.2); }}
.w-status { font-size: 18px; font-weight: 700; fill: var(--amber);}
/* "+" when someone edits; "✕" when they can't */.w-float { font-size: 38px; font-weight: 900; pointer-events: none; animation: w-float-up 1s ease-out forwards;}
.w-float.fail { fill: var(--amber);}
@keyframes w-float-up { 0% { transform: translateY(8px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; }}
.w-body.shake { animation: w-shake 0.45s;}
@keyframes w-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); }}
/* ── Supervisor ──────────────────────────────────────────── */
.w-sup { display: grid; grid-template-columns: 1fr 15rem; gap: 2rem; align-items: start;}
.w-node .w-skull { font-size: 40px; opacity: 0; pointer-events: none; transform: scale(0.4); transform-box: fill-box; transform-origin: center; transition: opacity 0.2s var(--ease), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);}
.w-node .w-skull.big { font-size: 72px;}
.w-node.down .w-skull { opacity: 1; transform: scale(1);}
/* Auto mode is ambient: just the tree and the two counters */.w-sup.auto { grid-template-columns: 1fr 13rem; align-items: center;}
.w-sup.auto .w-svg { max-height: 470px;}
.w-sup.auto .w-hint,.w-sup.auto .w-log,.w-sup.auto [data-act="reset"] { display: none;}
.w-side { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start;}
.w-stat { display: flex; flex-direction: column;}
.w-stat .w-num { font-family: var(--mono); font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums;}
.w-stat.small .w-num { font-size: 0.9rem;}
.w-stat .w-cap { font-size: 0.48rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-light);}
.w-hint { font-size: 0.5rem; color: var(--grey); line-height: 1.4; margin: 0.2rem 0 0;}
.reveal .w-log { width: 100%; min-height: 9.5rem; font-family: var(--mono); font-size: 0.42rem; line-height: 1.6; color: var(--ink-soft); background: rgba(27, 22, 34, 0.035); border: 1px solid var(--rule); border-radius: 8px; padding: 0.5rem 0.6rem; box-sizing: border-box; white-space: pre; overflow: hidden; margin: 0;}
.w-log .bad { color: var(--amber);}
.w-log .good { color: var(--teal);}
.w-log .meta { color: var(--grey);}
/* ── Topology ────────────────────────────────────────────── */
.w-topo { display: flex; flex-direction: column; gap: 0.4rem;}
.w-controls { display: flex; align-items: center; justify-content: center; gap: 1.6rem; margin-top: 0.5rem;}
.w-topo .w-svg { max-height: 580px;}
/* Centred under the diagram */.w-speed { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;}
.w-speed .w-cap { font-size: 0.42rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-light);}
.w-speed .w-speed-val { color: var(--orchid); letter-spacing: 0;}
.w-speed-row { display: flex; align-items: center; gap: 0.35rem; font-size: 0.7rem;}
.w-speed input { width: 9rem; accent-color: var(--orchid); cursor: pointer;}
/* ── CRDT ────────────────────────────────────────────────── */
.w-crdt { display: grid; grid-template-columns: 1fr 15rem 1fr; gap: 1.2rem; align-items: stretch;}
.w-replica { border: 2px solid var(--elixir); border-radius: 14px; background: #fff; padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.7rem; transition: border-color 0.4s;}
.w-crdt.offline .w-replica { border-style: dashed;}
.w-rhead { display: flex; justify-content: space-between; align-items: baseline;}
.w-rname { font-size: 0.85rem; font-weight: 800;}
.w-avatar { font-size: 1.15rem; margin-right: 0.35rem; vertical-align: -0.12em;}
.w-rstatus { font-size: 0.48rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber);}
.w-set { display: flex; flex-wrap: wrap; gap: 0.4rem; min-height: 2.6rem; align-items: center; padding: 0.4rem; border-radius: 10px; background: var(--wash);}
.w-set.w-flash { animation: w-set-flash 0.7s var(--ease);}
@keyframes w-set-flash { 0% { background: rgba(13, 148, 136, 0.2); }}
.w-empty { font-family: var(--mono); color: var(--grey-light); padding-left: 0.4rem;}
.reveal .w-chip { font-size: 1.3rem; line-height: 1; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 0.25rem 0.35rem;}
.reveal .w-chip:hover { border-color: var(--amber); background: rgba(194, 116, 10, 0.08);}
.w-add { display: flex; flex-wrap: wrap; gap: 0.3rem;}
.reveal .w-add button { font-size: 0.75rem; background: none; border: 1px dashed var(--grey-light); border-radius: 8px; padding: 0.2rem 0.45rem; color: var(--ink-soft);}
.reveal .w-add button:hover { border-style: solid; border-color: var(--elixir);}
.reveal .w-ops { font-family: var(--mono); font-size: 0.55rem; line-height: 1.55; color: var(--ink-soft); min-height: 4.4rem; margin: 0; white-space: pre;}
.w-ops i { font-style: normal; color: var(--grey-light);}
.w-ops .remote { color: var(--elixir);}
.w-net { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;}
/* A crossed-out thumbnail of the iCloud dialog, as a reminder */.w-reminder { position: relative; margin: 0 0 -0.4rem; width: 7rem;}
/* The tilt lives on the children, so the slide zoom can transform the figure itself without undoing it */.w-reminder > * { transform: rotate(-3deg);}
.w-reminder img { display: block; width: 100%; margin: 0; border-radius: 8px; border: 1px solid var(--rule); box-shadow: 0 10px 24px -14px rgba(27, 22, 34, 0.45); opacity: 0.85;}
.w-reminder .x { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 900; line-height: 1; color: var(--amber); text-shadow: 0 2px 0 #fff, 0 0 12px #fff;}
.w-wire { width: calc(100% + 2.4rem); height: 2rem; position: relative; border-top: 3px solid var(--teal); margin-top: 1rem; transition: border-color 0.4s;}
.w-crdt.offline .w-wire { border-top: 3px dashed var(--amber);}
.w-lane { position: absolute; inset: -1rem 0 0;}
.w-fly { position: absolute; left: 0; top: 0; font-size: 0.6rem; font-weight: 700; background: #fff; border: 2px solid var(--orchid); border-radius: 999px; padding: 0.1rem 0.4rem; opacity: 0; white-space: nowrap;}
.w-fly.rm { border-color: var(--amber);}
/* The courier walks with a little bounce, facing the way it's going */.w-courier { border-color: var(--teal); white-space: nowrap; display: inline-flex; align-items: center; gap: 0.25rem;}
/* 👟 points right in the presenting font (it varies by emoji font), so mirror it only on the walk back to Alice */.w-courier .shoe { display: inline-block; animation: w-step 0.32s ease-in-out infinite alternate;}
.w-courier.back .shoe { transform: scaleX(-1); animation-name: w-step-back;}
@keyframes w-step { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-5px) rotate(6deg); }}
@keyframes w-step-back { from { transform: scaleX(-1) translateY(0) rotate(-6deg); } to { transform: scaleX(-1) translateY(-5px) rotate(6deg); }}
.w-sneakers { display: flex; gap: 0.4rem;}
.reveal .widget .w-sneaker { font-size: 0.42rem; padding: 0.35rem 0.55rem; white-space: nowrap;}
.reveal .widget .w-sneaker:disabled { opacity: 0.35; cursor: default;}
.w-verdict { font-size: 0.7rem; font-weight: 800; color: var(--grey); margin: 0 !important; min-height: 1em;}
.w-verdict.good { color: var(--teal);}
.w-verdict.bad { color: var(--amber);}