/* weave.css — VÄVEN (okt 2026): de fem dimensionerna som en väv, på datorn och i mobilen (js/weave.js).
 * Kodningen: Tillstånd grå fyrkant, Information blå (också trådarnas färg), Intention violett, Transformation orange,
 * Relation turkos pille. Tid = trådens tjocklek, streckat = tystnar. Integritet = streckad gräns. Brott = orange streck.
 * Ytor och text lånas av sidan (datorns --bg-surface/--text-*, mobilens --surface/--ink); mörkt läge följer
 * data-theme="dark" eller systemet (samma mönster som time.css). */
.wv, .wv-peek, .wv-overlay, .wv-scrim {
  --wv-bg: var(--bg-base, var(--bg, #f0f2f5)); --wv-surface: var(--bg-surface, var(--surface, #ffffff)); --wv-ink: var(--text-primary, var(--ink, #111827));
  --wv-soft: var(--text-secondary, var(--soft, #374151)); --wv-muted: var(--text-muted, var(--faint, #6b7280)); --wv-line: var(--border-subtle, var(--line, rgba(0, 0, 0, .08)));
  --wv-line2: var(--border-default, var(--line-strong, rgba(0, 0, 0, .14))); --wv-accent: var(--accent, #2563eb); --wv-accent-ink: #ffffff; --wv-hover: var(--bg-hover, rgba(37, 99, 235, .06));
  --wv-chip: #e5e7eb; --wv-chip-on: #111827; --wv-chip-on-ink: #ffffff; --wv-center: #111827; --wv-center-ink: #ffffff;
  --wv-thread: #3b82f6; --wv-quiet: #9ca3af; --wv-break: #d97706; --wv-badge: #b45309; --wv-badge-ink: #ffffff;
  --wv-lens-bg: #fef3c7; --wv-lens-ink: #92400e; --wv-concl: #111827; --wv-concl-ink: #ffffff;
  --wv-t-line: #64748b; --wv-t-fill: #f1f5f9; --wv-t-ink: #1e293b;
  --wv-i-line: #3b82f6; --wv-i-fill: #eff6ff; --wv-i-ink: #1e3a8a;
  --wv-n-line: #7c3aed; --wv-n-fill: #f5f3ff; --wv-n-ink: #4c1d95;
  --wv-f-line: #ea580c; --wv-f-fill: #fff7ed; --wv-f-ink: #7c2d12;
  --wv-r-line: #0d9488; --wv-r-fill: #f0fdfa; --wv-r-ink: #134e4a;
  --wv-q-fill: #f9fafb;
  --wv-font: var(--font-sans, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.wv, .wv-peek, .wv-overlay, .wv-scrim) {
    --wv-chip: #262b33; --wv-chip-on: #e8eaed; --wv-chip-on-ink: #111317; --wv-center: #e8eaed; --wv-center-ink: #111317;
    --wv-thread: #60a5fa; --wv-quiet: #6b7280; --wv-break: #f59e0b; --wv-badge: #f59e0b; --wv-badge-ink: #1a1203;
    --wv-lens-bg: #3a2a0c; --wv-lens-ink: #fcd34d; --wv-concl: #262b33; --wv-concl-ink: #f3f4f6;
    --wv-t-line: #94a3b8; --wv-t-fill: #1e2530; --wv-t-ink: #e2e8f0;
    --wv-i-line: #60a5fa; --wv-i-fill: #13233d; --wv-i-ink: #dbeafe;
    --wv-n-line: #a78bfa; --wv-n-fill: #221a3a; --wv-n-ink: #ede9fe;
    --wv-f-line: #fb923c; --wv-f-fill: #2e1c10; --wv-f-ink: #ffedd5;
    --wv-r-line: #2dd4bf; --wv-r-fill: #0f2a28; --wv-r-ink: #ccfbf1;
    --wv-q-fill: #1a1d22;
  }
}
:root[data-theme="dark"] :is(.wv, .wv-peek, .wv-overlay, .wv-scrim) {
  --wv-chip: #262b33; --wv-chip-on: #e8eaed; --wv-chip-on-ink: #111317; --wv-center: #e8eaed; --wv-center-ink: #111317;
  --wv-thread: #60a5fa; --wv-quiet: #6b7280; --wv-break: #f59e0b; --wv-badge: #f59e0b; --wv-badge-ink: #1a1203;
  --wv-lens-bg: #3a2a0c; --wv-lens-ink: #fcd34d; --wv-concl: #262b33; --wv-concl-ink: #f3f4f6;
  --wv-t-line: #94a3b8; --wv-t-fill: #1e2530; --wv-t-ink: #e2e8f0;
  --wv-i-line: #60a5fa; --wv-i-fill: #13233d; --wv-i-ink: #dbeafe;
  --wv-n-line: #a78bfa; --wv-n-fill: #221a3a; --wv-n-ink: #ede9fe;
  --wv-f-line: #fb923c; --wv-f-fill: #2e1c10; --wv-f-ink: #ffedd5;
  --wv-r-line: #2dd4bf; --wv-r-fill: #0f2a28; --wv-r-ink: #ccfbf1;
  --wv-q-fill: #1a1d22;
}

/* ── Ramen ── */
.wv { font-family: var(--wv-font); color: var(--wv-ink); display: flex; flex-direction: column; gap: 16px; min-width: 0; box-sizing: border-box; }
.wv *, .wv-peek * { box-sizing: border-box; }
:where(.wv, .wv-peek) button { font: inherit; color: inherit; }
.wv button, .wv-peek button { touch-action: manipulation; }
.wv :focus-visible, .wv-peek :focus-visible { outline: 2px solid var(--wv-accent); outline-offset: 2px; }
.wv-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wv-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.wv-head-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 320px; }
.wv-eyebrow { font-size: 13px; color: var(--wv-muted); letter-spacing: .02em; }
.wv-h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.wv-subtitle { margin: 0; font-size: 14px; color: var(--wv-soft); line-height: 1.45; }
.wv-head-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wv-scales { display: flex; gap: 4px; padding: 4px; background: var(--wv-chip); border-radius: 10px; max-width: 100%; }
.wv-scale { min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--wv-soft); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.wv-scale[aria-pressed="true"] { background: var(--wv-surface); color: var(--wv-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.wv-close { min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--wv-line2); background: var(--wv-surface); cursor: pointer; font-size: 14px; }
.wv-linkbtn { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--wv-accent); font-size: 14px; font-weight: 500; cursor: pointer; }

/* Linserna: en rad (datorn bryter, mobilen rullar i sidled med snäpp). */
.wv-lenses { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.wv-lenses-l { font-size: 13px; color: var(--wv-muted); margin-right: 4px; }
.wv-lens { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--wv-line2); background: var(--wv-surface); color: var(--wv-soft); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.wv-lens:hover { border-color: var(--wv-accent); }
.wv-lens[aria-pressed="true"] { background: var(--wv-chip-on); border-color: var(--wv-chip-on); color: var(--wv-chip-on-ink); }
.wv-lens-n { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .75; }

.wv-main { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; min-width: 0; }
.wv-canvas-sec { flex: 999 1 640px; min-width: 0; background: var(--wv-surface); border: 1px solid var(--wv-line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.wv-canvas-top { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; align-items: baseline; }
.wv-lens-title { font-size: 14px; font-weight: 600; }
.wv-lens-hint { font-size: 13px; color: var(--wv-soft); }
.wv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--wv-soft); align-items: center; }
.wv-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.wv-sw { width: 14px; height: 14px; border: 1.5px solid; border-radius: 4px; flex: none; }
.wv-sw.is-tillstand { border-color: var(--wv-t-line); background: var(--wv-t-fill); border-radius: 3px; }
.wv-sw.is-information { width: 22px; height: 4px; border: 0; border-radius: 2px; background: var(--wv-thread); }
.wv-sw.is-intention { border-color: var(--wv-n-line); background: var(--wv-n-fill); }
.wv-sw.is-transformation { border-color: var(--wv-f-line); background: var(--wv-f-fill); }
.wv-sw.is-relation { width: 20px; border-color: var(--wv-r-line); background: var(--wv-r-fill); border-radius: 999px; }
.wv-sw-badge { width: 16px; height: 16px; border-radius: 50%; background: var(--wv-badge); color: var(--wv-badge-ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wv-sw-bound { width: 18px; height: 12px; border: 1.5px dashed var(--wv-muted); border-radius: 4px; }
.wv-legend-sep { color: var(--wv-quiet); }
.wv-legend-d summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 13px; color: var(--wv-soft); }
.wv-legend-d .wv-legend { padding-bottom: 6px; }

/* Duken: SVG för trådarna (aria-hidden), riktiga knappar för noderna. */
.wv-canvas { position: relative; width: 100%; margin: 0 auto; touch-action: manipulation; }
.wv-canvas.is-bounded::before { content: ""; position: absolute; inset: 2px; border: 1.5px dashed var(--wv-line2); border-radius: 28px; pointer-events: none; }
.wv-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; pointer-events: none; }
.wv-edge { stroke: var(--wv-thread); transition: opacity .2s; }
.wv-edge.is-quiet { stroke: var(--wv-quiet); stroke-dasharray: 4 7; }
.wv-edge.is-dim { opacity: .12; }
.wv-break { stroke: var(--wv-break); stroke-width: 2.5; stroke-dasharray: 6 6; }
.wv-break-ring { stroke: var(--wv-break); stroke-width: 2; stroke-dasharray: 4 5; }
.wv-node { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px; padding: 6px 12px; border: 1.5px solid var(--wv-line2);
  border-radius: 12px; background: var(--wv-surface); color: var(--wv-ink); text-align: start; cursor: pointer; line-height: 1.25; min-width: 0; overflow: hidden; transition: opacity .2s, box-shadow .2s; }
.wv-node:hover { box-shadow: 0 2px 10px rgba(15, 20, 30, .12); }
.wv-node-k { font-size: 11px; font-weight: 500; letter-spacing: .01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-node-l { font-size: 13.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-node.has-badge .wv-node-k, .wv-node.has-badge .wv-node-l { padding-right: 16px; }
.wv-node.is-tillstand { border-color: var(--wv-t-line); background: var(--wv-t-fill); color: var(--wv-t-ink); border-radius: 4px; }
.wv-node.is-information { border-color: var(--wv-i-line); background: var(--wv-i-fill); color: var(--wv-i-ink); }
.wv-node.is-intention { border-color: var(--wv-n-line); background: var(--wv-n-fill); color: var(--wv-n-ink); }
.wv-node.is-transformation { border-color: var(--wv-f-line); background: var(--wv-f-fill); color: var(--wv-f-ink); }
.wv-node.is-relation { border-color: var(--wv-r-line); background: var(--wv-r-fill); color: var(--wv-r-ink); border-radius: 999px; padding: 6px 16px; }
.wv-node.is-quiet { border-style: dashed; background: var(--wv-q-fill); }
.wv-node.is-dim { opacity: .15; }
.wv-node.is-hl { box-shadow: 0 0 0 3px color-mix(in srgb, var(--wv-break) 35%, transparent); }
.wv-node.is-sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--wv-accent) 45%, transparent); }
.wv-badge { position: absolute; top: 5px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--wv-badge); color: var(--wv-badge-ink); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }
.wv-center { position: absolute; display: flex; align-items: center; justify-content: center; padding: 0 12px; background: var(--wv-center); color: var(--wv-center-ink); border-radius: 28px; font-size: 15px; font-weight: 600; text-align: center; overflow: hidden; }
.wv-center > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-dimlab { position: absolute; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--wv-muted);
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.wv-dimlab:hover { background: var(--wv-hover); color: var(--wv-ink); }
.wv-dimlab[aria-expanded="true"] { background: var(--wv-chip); color: var(--wv-ink); }
.wv-dimlab-more { font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--wv-accent); }
.wv-dimlab.is-static { padding: 0; font-size: 10.5px; letter-spacing: .05em; cursor: default; pointer-events: none; background: transparent; }
.wv-sectors { margin-top: 2px; }
.wv-dimlab-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.wv-sector-list { border-top: 1px solid var(--wv-line); padding-top: 10px; }
.wv-sector-list h3 { margin: 0 0 6px; font-size: 14px; }

/* Kompakt (mobilen): noderna blir prickar med korta namn — träffytan är ändå 44 px. */
.wv-node.is-compact { flex-direction: row; align-items: center; gap: 5px; padding: 0 8px; border-radius: 22px; border-width: 1px; }
.wv-node.is-compact .wv-node-l { font-size: 12px; font-weight: 600; }
.wv-node.is-compact.is-relation { padding: 0 8px; }
.wv-node.is-compact.is-tillstand { border-radius: 10px; }
.wv-dot { width: 10px; height: 10px; flex: none; border: 2px solid currentColor; border-radius: 3px; }
.wv-node.is-relation .wv-dot { border-radius: 50%; }
.wv-node.is-compact .wv-badge { position: static; width: 15px; height: 15px; font-size: 10px; flex: none; }
.wv-node.is-compact .wv-dot { width: 11px; height: 11px; margin: 0 2px; }
.wv-node.is-compact.has-badge .wv-node-l { padding-right: 0; }

/* Fynden */
.wv-finds { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.wv-finds-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wv-finds-h h2 { margin: 0; font-size: 18px; font-weight: 700; }
.wv-finds-n { font-size: 13px; color: var(--wv-muted); }
.wv-find { background: var(--wv-surface); border: 1px solid var(--wv-line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .2s, opacity .25s; }
.wv-find.is-focus { box-shadow: 0 0 0 2px var(--wv-break); }
.wv-find.is-gone { opacity: .3; pointer-events: none; }
.wv-find-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wv-lens-tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--wv-lens-bg); color: var(--wv-lens-ink); }
.wv-find-dims { font-size: 12px; color: var(--wv-muted); }
.wv-find-title { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: start; font-size: 15px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.wv-find-title:hover { color: var(--wv-accent); }
.wv-find-sub { margin: 0; font-size: 13px; color: var(--wv-soft); line-height: 1.45; }
.wv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.wv-btn { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--wv-line2); background: var(--wv-surface); color: var(--wv-soft); font-size: 13px; cursor: pointer; }
.wv-btn:hover { border-color: var(--wv-accent); color: var(--wv-accent); }
.wv-btn.is-primary { border-color: var(--wv-accent); background: var(--wv-accent); color: var(--wv-accent-ink); font-weight: 600; }
.wv-btn.is-primary:hover { filter: brightness(1.08); color: var(--wv-accent-ink); }
.wv-btn:disabled { opacity: .5; cursor: default; }
.wv-note { margin: 2px; font-size: 12px; color: var(--wv-muted); line-height: 1.5; }
.wv-empty { margin: 0; padding: 10px 2px; font-size: 14px; color: var(--wv-muted); }
.wv-err { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--wv-line2); background: var(--wv-surface); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Listan: väven som fem avsnitt (tillgängligt alternativ). */
.wv-list { display: flex; flex-direction: column; gap: 16px; }
.wv-list-sec h3 { margin: 0 0 6px; font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.wv-list-sec h3 small { font-weight: 400; color: var(--wv-muted); font-size: 12.5px; }
.wv-list-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wv-list-item { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--wv-line); border-left-width: 4px; border-radius: 10px; background: var(--wv-surface); text-align: start; cursor: pointer; }
.wv-list-item:hover { background: var(--wv-hover); }
.wv-list-item.is-quiet { border-style: dashed; border-left-style: solid; }
.wv-list-item.is-tillstand { border-left-color: var(--wv-t-line); }
.wv-list-item.is-information { border-left-color: var(--wv-i-line); }
.wv-list-item.is-intention { border-left-color: var(--wv-n-line); }
.wv-list-item.is-transformation { border-left-color: var(--wv-f-line); }
.wv-list-item.is-relation { border-left-color: var(--wv-r-line); }
.wv-list-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wv-list-l { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.wv-list-s { font-size: 12.5px; color: var(--wv-muted); overflow-wrap: anywhere; }
.wv-list-item .wv-badge { position: static; flex: none; }

/* Projektväljaren */
.wv-picker { display: flex; flex-direction: column; gap: 8px; }
.wv-picker ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.wv-picker button { width: 100%; min-height: 48px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--wv-line2); background: var(--wv-surface); text-align: start; cursor: pointer; font-size: 14px; font-weight: 600; }
.wv-picker button:hover { border-color: var(--wv-accent); }

/* ── Datorn: väven som eget lager (från Hem, menyn, plattformen) ── */
.wv-overlay { position: fixed; inset: 0; z-index: 10045; background: var(--wv-bg); overflow-y: auto; overscroll-behavior: contain; }
.wv-overlay > .wv { max-width: 1360px; margin: 0 auto; padding: 24px 24px 48px; }
html.wv-open { overflow: hidden; }

/* ── Nodens detalj: sidopanel (datorn) eller ark nerifrån (mobilen) ── */
.wv-peek { position: fixed; z-index: 10050; display: flex; flex-direction: column; background: var(--wv-surface); color: var(--wv-ink); font-family: var(--wv-font); font-size: 14px; line-height: 1.45; }
.wv-peek.is-side { top: 0; right: 0; bottom: 0; width: min(480px, 100vw); border-left: 1px solid var(--wv-line2); box-shadow: -10px 0 30px rgba(15, 20, 30, .12); }
.wv-peek.is-sheet { left: 0; right: 0; bottom: 0; max-height: min(92dvh, 92vh); height: min(92dvh, 92vh); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(15, 20, 30, .22);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
@media (min-width: 600px) { .wv-peek.is-sheet { left: 50%; right: auto; width: min(560px, 100%); transform: translateX(-50%); } }
.wv-scrim { position: fixed; inset: 0; z-index: 10049; background: rgba(10, 12, 16, .4); }
.wv-grab { flex: none; display: flex; justify-content: center; align-items: center; min-height: 28px; touch-action: none; cursor: grab; }
.wv-grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--wv-line2); }
.wv-pk-head { flex: none; display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--wv-line); }
.wv-peek.is-sheet .wv-pk-head { padding-top: 2px; }
.wv-pk-ht { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wv-pk-eyebrow { font-size: 12.5px; color: var(--wv-muted); overflow-wrap: anywhere; }
.wv-pk-h { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.wv-pk-x { flex: none; min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--wv-line2); background: var(--wv-surface); cursor: pointer; font-size: 14px; }
.wv-pk-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.wv-pk-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.wv-pk-badge { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--wv-chip); color: var(--wv-ink); }
.wv-concl { background: var(--wv-concl); color: var(--wv-concl-ink); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wv-concl p { margin: 0; font-size: 15.5px; line-height: 1.5; }
.wv-concl .wv-btn { min-height: 44px; border-color: rgba(255, 255, 255, .45); background: transparent; color: var(--wv-concl-ink); font-weight: 600; }
.wv-concl .wv-btn.is-primary { background: var(--wv-concl-ink); border-color: var(--wv-concl-ink); color: var(--wv-concl); }
.wv-pk-sec { border: 1px solid var(--wv-line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.wv-pk-sec h3 { margin: 0; font-size: 14px; font-weight: 700; }
.wv-pk-small { font-size: 12.5px; color: var(--wv-muted); }
.wv-rhythm { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.wv-rhythm span { flex: 1 1 0; min-height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--wv-r-line) 45%, var(--wv-surface)); }
.wv-rhythm span.is-recent { background: var(--wv-r-line); }
.wv-rhythm-x { display: flex; justify-content: space-between; font-size: 12px; color: var(--wv-muted); }
.wv-pk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.wv-pk-card { border: 1px solid var(--wv-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wv-pk-card b { font-size: 15px; overflow-wrap: anywhere; }
.wv-pk-card.is-warn { border-color: color-mix(in srgb, var(--wv-break) 55%, var(--wv-line)); }
.wv-balance { display: flex; gap: 3px; }
.wv-balance span { height: 10px; border-radius: 5px; min-width: 6px; }
.wv-balance .is-us { background: var(--wv-break); }
.wv-balance .is-them { background: var(--wv-r-line); }
.wv-linked { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 8px; }
.wv-linked button { width: 100%; min-height: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border: 1px solid var(--wv-line); border-radius: 12px; background: var(--wv-surface); text-align: start; cursor: pointer; }
.wv-linked button:hover { border-color: var(--wv-accent); }
.wv-linked button.is-quiet { border-style: dashed; }
.wv-linked .wv-node-k { color: var(--wv-muted); }
.wv-linked b { font-size: 14px; overflow-wrap: anywhere; }
.wv-linked small { font-size: 12.5px; color: var(--wv-soft); }
.wv-pk-finds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* ── Mobilen och smalt: fynden först, linserna i en rullande rad ── */
.wv.is-mobile { gap: 12px; }
.wv.is-mobile .wv-head { align-items: stretch; flex-direction: column; gap: 10px; }
.wv.is-mobile .wv-head-t { flex: none; }
.wv.is-mobile .wv-h1 { font-size: 22px; }
.wv.is-mobile .wv-subtitle { font-size: 13px; }
.wv.is-mobile .wv-head-r { width: 100%; }
.wv.is-mobile .wv-scales { width: 100%; }
.wv.is-mobile .wv-scale { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.wv.is-mobile .wv-lenses { position: relative; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); }
.wv.is-mobile .wv-lenses::-webkit-scrollbar { display: none; }
.wv.is-mobile .wv-lenses-l { display: none; }
.wv.is-mobile .wv-sectors { margin: 0 -6px; padding: 2px 10px 4px; scroll-padding-inline: 10px; }
.wv.is-mobile .wv-canvas-top { flex-wrap: nowrap; align-items: center; }
.wv.is-mobile .wv-lens-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv.is-mobile .wv-canvas-top .wv-linkbtn { flex: none; }
.wv.is-mobile .wv-lens { flex: none; min-height: 44px; scroll-snap-align: start; font-size: 14px; }
.wv.is-mobile .wv-main { flex-direction: column; flex-wrap: nowrap; gap: 14px; align-items: stretch; }
.wv.is-mobile .wv-canvas-sec { flex: none; padding: 10px 6px; border-radius: 14px; }
.wv.is-mobile .wv-canvas-top, .wv.is-mobile .wv-legend-d { padding: 0 4px; }
.wv.is-mobile .wv-finds { flex: none; }
.wv.is-mobile .wv-find { padding: 14px; }
.wv.is-mobile .wv-find-title { min-height: 44px; font-size: 16px; }
.wv.is-mobile .wv-btn { min-height: 44px; font-size: 14px; padding: 0 16px; }
.wv.is-mobile .wv-find-sub { font-size: 14px; }
.wv-overlay > .wv.is-mobile { padding: 12px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
.wv.is-embed { gap: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .wv-peek.is-side { animation: wv-in-r .2s ease-out; }
  .wv-peek.is-sheet { animation: wv-fade .2s ease-out; }
  .wv-scrim { animation: wv-fade .2s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .wv-node, .wv-edge, .wv-find { transition: none; }
}
@keyframes wv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wv-in-r { from { opacity: 0; } to { opacity: 1; } }

/* Om organisationen: de fem dimensionerna som en rad över väven — varje kort öppnar dimensionens sida. */
.wv-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 8px; }
.wv-dimcard { min-height: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--wv-line); border-top: 3px solid; border-radius: 12px; background: var(--wv-surface); text-align: start; cursor: pointer; }
.wv-dimcard:hover { background: var(--wv-hover); }
.wv-dimcard.is-tillstand { border-top-color: var(--wv-t-line); }
.wv-dimcard.is-information { border-top-color: var(--wv-i-line); }
.wv-dimcard.is-intention { border-top-color: var(--wv-n-line); }
.wv-dimcard.is-transformation { border-top-color: var(--wv-f-line); }
.wv-dimcard.is-relation { border-top-color: var(--wv-r-line); }
.wv-dimcard-n { font-size: 14px; font-weight: 700; }
.wv-dimcard-s { font-size: 12.5px; color: var(--wv-muted); }

/* Plattformens skala: loopen och funktionerna */
.wv-loop { background: var(--wv-surface); border: 1px solid var(--wv-line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wv-loop h2, .wv-features h2 { margin: 0; font-size: 18px; font-weight: 700; }
.wv-loop-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.wv-loop-step { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1.5px solid var(--wv-line2); border-radius: 12px; min-width: 0; }
.wv-loop-step:not(:last-child)::after { content: "→"; position: absolute; right: -17px; width: 12px; text-align: center; top: 50%; transform: translateY(-50%); color: var(--wv-muted); font-size: 13px; }
.wv-loop-step.is-information { border-color: var(--wv-i-line); background: var(--wv-i-fill); color: var(--wv-i-ink); }
.wv-loop-step.is-intention { border-color: var(--wv-n-line); background: var(--wv-n-fill); color: var(--wv-n-ink); }
.wv-loop-step.is-transformation { border-color: var(--wv-f-line); background: var(--wv-f-fill); color: var(--wv-f-ink); }
.wv-loop-step.is-tillstand { border-color: var(--wv-t-line); background: var(--wv-t-fill); color: var(--wv-t-ink); border-radius: 4px; }
.wv-loop-step.is-relation { border-color: var(--wv-r-line); background: var(--wv-r-fill); color: var(--wv-r-ink); border-radius: 22px; }
.wv-loop-k { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; overflow-wrap: anywhere; }
.wv-loop-n { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.wv-loop-s { font-size: 12.5px; overflow-wrap: anywhere; }
.wv-loop-note { margin: 0; font-size: 13px; color: var(--wv-soft); }
.wv-features { display: flex; flex-direction: column; gap: 10px; }
.wv-fe-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.wv-fe { width: 100%; min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border: 1.5px solid var(--wv-f-line); border-radius: 12px; background: var(--wv-surface); text-align: start; cursor: pointer; }
.wv-fe:hover { background: var(--wv-f-fill); }
.wv-fe.is-quiet { border-style: dashed; background: var(--wv-q-fill); }
.wv-fe-top { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.wv-fe-top b { font-size: 15px; overflow-wrap: anywhere; }
.wv-fe-top .wv-badge { position: static; flex: none; }
.wv-fe-sub { font-size: 13px; color: var(--wv-soft); }
.wv-fe-q { font-size: 12px; font-weight: 600; color: var(--wv-muted); }
.wv.is-mobile .wv-loop { padding: 14px; }
.wv.is-mobile .wv-loop-steps { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 14px; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px 4px; gap: 14px; }
.wv.is-mobile .wv-loop-steps::-webkit-scrollbar { display: none; }
.wv.is-mobile .wv-loop-step { flex: 0 0 min(64%, 220px); scroll-snap-align: start; }
.wv.is-mobile .wv-loop-step:not(:last-child)::after { right: -14px; }
@media (max-width: 899px) { .wv:not(.is-mobile) .wv-loop-steps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .wv:not(.is-mobile) .wv-loop-step::after { display: none; } }
